4 Replies Latest reply on Apr 19, 2010 10:19 AM by Matt Schneck

    Audio control issues

    Matt Schneck Level 1

      Hi everyone!


      I'm working through a presentation right now that is giving me an issue that I just can't figure out.


      What I have is a series of frames, and on each frame is a visual/interactive element, and a movieclip containing a sound clip.


      When I let the movie play like normal, everything runs fine.  When I allow the user to skip ahead, however, some of the audio clips that it skips in the timeline are played.  It's not all of the audio clips, as far as I can tell, which makes it that much more confusing.


      I'm using CS3, and AS3.  I never had this issue with AS2 before, so I'm guessing that I'm using the sound clips wrong now.


      The audio clips are all set to stream, because there are times when the audio has to pause until the user does something.


      Any ideas on this?  I'm hoping I made my problem clear enough...since I don't know where the problem is coming from exactly, I'm having trouble figuring out which details to include.


      Any help would be GREATLY appreciated!

        • 1. Re: Audio control issues
          kglad Adobe Community Professional & MVP

          if youre sounds are set to stream, you'll have this problem.  you can use:




          to stop all sounds when needed.

          • 2. Re: Audio control issues
            Matt Schneck Level 1

            Thanks, but I already have the SoundMixer.stopAll(); all over the place -- the navigation bar skips the user to different points in the project, so the first frame of each of those sections has the command, plus every movieclip that contains a sound clip has that on the first frame, then the sound clip starts on the second frame.  (And yes, I included the SoundMixer class)


            I also made sure to add a this.stop(); at the end of each audio clip, because some resources said that would also solve the problem... but now, when the audio clips play without being cued by the timeline, the clips play over and over, despite the object that they are in having the this.stop(); in the last frame (most likely because they aren't playing from the object, since the frame the object isn't ever actually accessed due to being skipped over.)



            In case my problem is still a little foggy


            On frames 2-5, I have different movie clips that each contain a different audio clip.  Each frame is supposed to stay there until the audio clip is done, or the user clicks somewhere.  If the user goes through each frame one at a time, in order, everything works fine.  If, however, the user decides to skip forward to, say, frame 5 while on frame 2, it will go to frame 5, but also play the audio from frames 3 and 4, despite the fact that those frames have been skipped.  The audio from frame 2 stops like it's supposed to, but starts up again during frame 5...for....some reason.

            • 3. Re: Audio control issues
              kglad Adobe Community Professional & MVP

              if any frame of any movieclip plays that has a streamed sound still existing at that frame, the sound will play.

              • 4. Re: Audio control issues
                Matt Schneck Level 1

                Right, I understand that, but that's the problem -- audio is being played from objects that are in frames that are never accessed.  On top of that, each time a new object containing a sound clip is accessed, it should stop any other sounds due to the SoundMixer.stopAll(); in the first frame, right?