2 Replies Latest reply on Aug 18, 2006 2:20 PM by Comp. 792-YeIbLU

    Need Help Syncing Audio and Images

    Comp. 792-YeIbLU Level 1
      Let me explain:

      (Fading Images)
      My Flash file is made up of images that fade in and out. (For e.g. Frame 1-100 is image 1 fading in and out. Frame 100-200 is image 02 fading in and out etc.)

      I have created an audio track in a separate layer that is the full length of my movie. (200 frames long)

      The Flash movie starts with the audio playing. If the user doesn't want the audio (music) to play then I want them to click a toggle on/off button to stop and start the movie. The problem is, if they stop the music and restart it the audio starts from the beginning of the audio track even if they restart it half way through the movie. How can I fix this so if the music is turned on at any point in the movie the audio track will pick up at the correct point in the movie.
        • 1. Re: Need Help Syncing Audio and Images
          Nickels55 Level 2
          You can use place your audio into a movieclip and set it to streaming. Use actionscript to figure out where you are in the main timeline (currentFrame), and use that info to jump to that corresponding location in the movieclip holding the audio. Your toggle switch can then just tell the audio filled movieclip to stop(); and the sound will stop.

          If your movie is on frame 58 and the person hits the audio "on" switch, actionscript will make the audio movieclip jump to frame 58 which is where it would have been if they didn't hit stop.

          The code for the audio on/off button would be something like:
          on (press) {
          x = currentFrame();

          Hope that makes sense. That is just my way, real Flash pros probably can one up that technique and make it happen easier.
          • 2. Re: Need Help Syncing Audio and Images
            Comp. 792-YeIbLU Level 1

            Thanks for the reply, Sorry but I am not experienced enought to understand how to do what you said. Do you know of a tutorial explaining this technique?