PDA

View Full Version : Stop sound while changing scen



olle15
May 18th, 2004, 11:27 AM
I have created an into to my flash site. I have put the intro in one scen and the main site in another. While the visitor watch the intro, he has the option to click "Skip intro", then he goes directly to the main site scen.

In the intro scen I also have added a sound track. So, I would like to find a way to stop the sound when the visitor click the "Skip intro" button and are linked to another scen. Right now the sound continue to the end of the sound track, even though I click to change scen. Does anyone know how to do this?

ScriptFlipper
May 18th, 2004, 12:54 PM
welcome olle!
add this to your realease-function on the skip-button, where "yourSound" is the name of your sound:


yourSound.stop();

and on the first frame of the new scene, add this:


yourSound.start();

that should do it. however, your sound must be added with actionscript for this to work - it cannot be a part of the timeline, if you know what I mean..