Skip to main content
Participant
June 21, 2006
Question

stopAllSounds();

  • June 21, 2006
  • 3 replies
  • 356 views
*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.
This topic has been closed for replies.

3 replies

Participant
June 21, 2006
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.
Participant
June 21, 2006
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.
kglad
Community Expert
Community Expert
June 21, 2006
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:

kglad
Community Expert
Community Expert
June 21, 2006
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.