0 Replies Latest reply on Dec 20, 2006 1:46 PM by jackinva

    mediaplayback object event listeners


      I'm new to using Flash and its actionscript. I'm using the Flash MX version. I'm working on an audio project that involves timestamped metadata associated with the audio. So I'm creating links in a web page to allow someone to jump to and play audio that is identified based on the associated metadata. So I've got an html page that contains Javascript with the SetVariable function being used to pass variables to a Flash file, which is working because I have the text variables defined on the stage and I can see the data values have changed.

      In the Flash file I've got a mediaplayback component (myMedia) defined along with the text variables that Javascript sets values for: playMe, startTime, stopTime, audioFile. In addition, I've defined a traceOutput text variable to use for debugging.

      I'm not familiar with event based programming, but I've been looking at the Flash on-line documentation as well as the AS for Flash MX definitive guide book. I've written some AS in my first frame of the only layer in the timeline to check for when a text variable has changed to indicate that the mediaplayback component should do things (see below). Of course nothing is working. Could someone please give me an idea if I'm completely off in what I'm trying to do? (Which by the way is to just have the media play within the timestamp block associated with the content that someone wants to listen to. The idea is to create a player that loads the media just once and allows for Javascript to update the player each time the same media file is referenced without reloading it. Presently we have solutions for playing the audio without using Flash, but in those, a 20Meg MP3 files is reloaded each time a link to it is clicked and I'd like to eliminate the repeated downloads of the same file when possible to improve response time when clicking on the links.)

      Thanks in advance,