2 Replies Latest reply on Nov 20, 2006 8:26 PM by judith_teresa

    How do I detect stopped audio?


      I'm an ActionScript noob, so please forgive me if this is totally obvious - I'm just not finding it in the docs.

      What I would like to do is play a sound file on each screen of a slide show (this part is working) but instead of the user pushing a button to go to the next slide, I would like to have a frame script detect whether the sound has stopped yet, and when it detects that the sound has finished playing, automatically go to the next screen.

      In essence, the code should look something like this:

      on enter the frame
      detect whether the sound in this frame has finished playing
      If the sound has finished playing, then go to the next frame
      If the sound is still playing, then stay on this frame and wait for it to finish.

      I probably also need something to detect whether the sound is still buffering, as well, so that it won't jump ahead without ever playing the sound at all.