4 Replies Latest reply on Jun 21, 2006 9:00 AM by kglad

    stopAllSounds();

    marcofella
      *Newbie Alert*

      I'm building a presentation in Flash 8. I am currently using the built in stopAllSounds(); function to stop an MP3 i have playing. However the results are not very good and the music stops suddenly.

      Is there a similar quick function to fade the music out quickly (over a couple of seconds)? I don't know Actionscript very well, so if there was some code i could just paste straight in it would be greatly appreciated.

      Thanks in advance.
        • 1. Re: stopAllSounds();
          kglad Adobe Community Professional & MVP
          no, there's not. you'll need to fade each sound object individually. you could write one function that would initiate a loop to fade a sound object it was passed as a parameter and one function that would fade a sound object that it was passed.

          you would then only need to call the initiating function with each sound object you want to fade. if you have more than a few sound objects you could use a for-loop to call the initiating function.
          • 2. Re: stopAllSounds();
            marcofella Level 1
            There is only one sound object playing, an MP3 with the identifier name 'sound1'.

            I wouldn't know where to start in writing a function to fade the sound. You couldn't point me in the right direction?

            Thanks.
            • 3. Re: stopAllSounds();
              marcofella Level 1
              There is only one sound object playing, an MP3 with the identifier name 'sound1'.

              I wouldn't know where to start in writing a function to fade the sound. You couldn't point me in the right direction?

              Thanks.
              • 4. Re: stopAllSounds();
                kglad Adobe Community Professional & MVP
                if you have a sound in your library with linkage id sound1 it must be attached to a sound object using a soundObj.attachSound("sound1"); statement. you would target soundObj for your fade: