1 Reply Latest reply on Oct 11, 2013 6:08 PM by kglad

    Playing and Pausing both Animation and Sound with Buttons

    TonyN2013

      Hello,

       

      I am somewhat new to Flash and am working on a class project. We are to create a animated Flash tutorial with interactive buttons and sound narration.

       

      I programmed Stop, Start and Pause buttons using actionscript for the movie, and they buttons work fine with the animation. However, I have a narrated .WAV audio clip on it's own timeline starting on frame 300, and when I click on the Stop, Start and Pause buttons, it stops the movie but the sound clip keeps playing. I am trying to figure out how to get both the annimation and sound to be controlled by the Stop, Start and Pause buttons at the same time.

       

      Is this a setting within the sound file? I have the .WAV sound clip set to "Start" as Event and Stream don't seem to work (or I was doing something wrong).

       

      Or is it a coding issue with the buttons?

       

      My button coding is:

       

      stop.addEventListener (MouseEvent.CLICK, stopMovie);

      function stopMovie(event:Event) : void

      {

         gotoAndStop(1)

      }

       

      play.addEventListener (MouseEvent.CLICK, playMovie);

      function playMovie(event:Event) : void

      {

         play();

      }

       

      pause.addEventListener (MouseEvent.CLICK, pauseMovie);

      function pauseMovie(event:Event) : void

      {

         stop();

      }

       

       

      Also, I am working on adding forward and backword scene navigation buttons too, so I need these to work with the sound as well.

       

       

      I would appreciate any help with this because I can't find an answer to this any place else.