5 Replies Latest reply on Jun 8, 2007 3:32 PM by kglad


    Rothrock Level 5
      I haven't done much with Sound in Flash, but am having to do some stuff now. What is the purpose of the optional parameter in the Sound.stop() method? Doesn't stop() just stop the sound?

        • 1. Re: Sound.stop()
          kglad Adobe Community Professional & MVP
          maybe you can attach more than one library sound to one sound object. i have no idea why anyone would do that, but if you could, then you could use the stop parameter to specifiy the sound file to stop.
          • 2. Re: Sound.stop()
            Rothrock Level 5

            Brings me to another question about attachSound();

            I'm making an AudioTip class – like hover tips/captions, but with audio. I've got one sound instance that I attach the sounds to and play. Each MovieClip on the stage has a tipType property that tells which soundLinkageID to attach. I've noticed that if a soundLinkageID isn't found that the last sound attached plays. Is there a way to check if a soundLinkageID actually was exported or is there a way to see if attachSound was successful?

            • 3. Re: Sound.stop()
              kglad Adobe Community Professional & MVP
              hey, you solved that mystery. it turns out that you can't attach two sound files to one sound object.

              but you found a use for the id parameter in the stop() method of the sound object!: use the previous id in the stop method after applying the start() method to the next (possibly) attached sound.
              • 4. Re: Sound.stop()
                Rothrock Level 5
                At first I was thinking that is a great solution. But then I realized that often the next sound will have the same linkage as the previous so that would stop it. I guess I could add a conditional…

                Well you got me thinking as usual. So thank you very much.
                • 5. Re: Sound.stop()
                  kglad Adobe Community Professional & MVP
                  you're welcome.