4 Replies Latest reply on Jan 19, 2015 1:24 PM by sacrtc

    Audio continues to play when movie clip is replayed

    sacrtc Level 1

      I have spent most of the day searching for a fix to this but have had no luck. Let me see if I can explain this clearly. I have created a flash file that contains audio. When I output the swf file, or do a test and rewind the clip, the original audio continues to play and a second instance of the audio begins to play again at the start. This results in two instances of the audio playing at the same time and out of sync. Each time the clip is rewound an additional audio instance is played on top of what is already playing. This happens if the audio is embedded in an flv (the original way it was sent to us), or if the audio is on its own layer. The audio is inside a movie clip but the problem remains even when the audio is the only thing in the swf. Eventually the swf file will go into Adobe Captivate where we have a widget set to replay the slide. This works perfectly when the audio is imported separately into Captivate.


      I am thinking that what I need to do is call the movie clip and then remove it when we go to replay the clip. I am not a coding guy so I am having a hard time figuring out if this is the correct approach. I am hoping the answer is easier than the explanation. 


      We use Captivate 7

      Flash CC, Flash 6

      Coding needs to be AS3


      Thanks in advance. 

        • 1. Re: Audio continues to play when movie clip is replayed
          robdillon Most Valuable Participant

          What you have found are two different versions of the same problem in Flash. A sound will continue to play until it finishes or it is told to stop. Video with sound will do the same thing. The solution is to tell the sound file to stop playing, or in your case, tell the video to stop playing when you no longer want it around. If you are playing the flv in an flvplayback component, be sure to give the component instance a name and then tell that instance to stop playing when you move away from it in the timeline.


          If you want to play the sound in a layer, then you want to set the frame's sound Sync property to "Stream". This will keep the playback head from playing new instances of the sound, it will start over, but it won't play one copy on top of another. If you want to stop a sound that is playing in a timeline layer, you will need to use "SoundMixer.stopAll();" this will stop all sounds that are playing. When you play a sound in a layer, you have no direct control over it, so you can only tell all of the currently playing sounds to stop.

          • 2. Re: Audio continues to play when movie clip is replayed
            Amy Blankenship Level 4

            Have you tried setting the audio to "stream"?

            1 person found this helpful
            • 3. Re: Audio continues to play when movie clip is replayed
              sacrtc Level 1

              Thanks Rob,


              This was the fix, though it took me a bit to figure out exactly where it needed to go. We nest clips inside clips inside clips. Not the way I would like to do things but I am working with a group from overseas and I have to work with what I am given. This works when the audio is in the flv file. Didn't try it with audio on its own layer since the audio is already in the flv and would take more work to remove it than we have time for.


              Thanks again for your help on this.

              • 4. Re: Audio continues to play when movie clip is replayed
                sacrtc Level 1

                Thanks for the thought. I had it set to steam. That does not effect the issue I was having at all though. This is definitely something to keep in mind when embedding the audio on its own layer though. I appreciate the help a lot. Thanks again for the reply.