3 Replies Latest reply on Mar 2, 2007 5:18 PM by kglad

    Need Help with Stopping Sound

    xMrMoox
      Hello, I need help.

      I need to load in an external .swf file into my new movie and stop the sound/music that is playing from the external swf file. I need the sound/music to stop immediately on frame one. I don't have the fla to the external swf file as it is years old. Can someone help me with this? I know there is "stopallsounds();" but I don't think I'm using it right because it won't stop the sound when I play the new exported swf.

      So to recap - I've loaded in a .swf on frame one (into a blank movie clip) - and on another layer tried to add the "stopallsounds();" action - music still plays - HELP!
        • 1. Re: Need Help with Stopping Sound
          kglad Adobe Community Professional & MVP
          use:

          stopAllSounds();
          • 2. Re: Need Help with Stopping Sound
            xMrMoox Level 1
            My question is, do I just stick "stopAllSounds();" as an action on the first frame? I've tried that and the sound keeps on playing. What would be the correct usage of this, I guess is what my question is. I tried sticking it on a second frame after the external swf loads in the first frame (that's all of the frames I have in my movie) but that did not work either. Any more help would be appreciated.

            One last thing - now when I applied that action to a button to test - it did work - but I don't want a button - I need for it to automatically turn off the sound.
            • 3. Re: Need Help with Stopping Sound
              kglad Adobe Community Professional & MVP
              you should execute stopAllSounds() when you want to stop the sound. executing that code before loading is complete and the sound starts clearly isn't going to work for you.

              you may need to experiment a little to find when the sound is instantiated. it may be in your external swf's first _root frame? 2nd? etc.

              when the sound is instantiated, you can execute stopAllSounds().

              or you may just execute stopAllSounds() repeatedly (in an onEnterFrame handler, for example) during the first 1 second after loading is complete and not hassle exactly when the sound is instantiated.