Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fading sound out?

Status
Not open for further replies.

danielh68

Technical User
Jul 31, 2001
431
US
Hi,

I have a movie clip with a sound file. I set it to fade out. The clip is about 50 frames. My actual Flash movie is 20. With that in mind, when I play it, the sound loops. I just want it to play once. I created an action in the movie clip at the end of the sound telling it to "stop"...I tried "stop playing all sounds" too. Anyhow it doesn't work. I suppose it's because when the Flash movie reaches 20 it starts over, thus playing the sound clip. So, how can I get the sound clip to only play once?

Thanks,
Dan
 
load the sound dynamically and dont put it in a frame then its easy to control. are you using mx?
 
--Do I still keep the sound in a movie clip? If so, how do I drag the sound onto the layout without creating a frame?

--"load the sound dynamically" is an action, correct? If so, can you direct me to where it's located?

--Should the action be in the movieclip or in the Flash movie?

--Yes, I using MX.

Thanks for help. Greatly appreciated.

--DanH
 
leave the sound file outside the flash file but in the same folder

actions to add to frame 1 of main timeline not inside the movie clip

mysound = new sound();
mysound.loadSound("mysound.start();

//just give the full url to your music file on the server

the music will play once then stop.

you can stop the music on any frame by adding
mysound.stop();
to the frame

//not needed if you only want it play once then stop

you can alter the volume of the music by using
mysound.setVolume(X); x any number between 0 and 100.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top