PDA

View Full Version : Sound Control Over Multiple Scenes, Please Help!



Ganolil Treefang
April 29th, 2002, 07:39 PM
I currently have a movie, about 12 scenes long. I have a sound control that loops the track I have the user select repeatedly. But because I wanted music to always play unless they manually turned down the volume in my controls I load the music each time the main scene is loaded... This ends all of the other sounds and just restarts the first track in my list.

Here's the code:

For the main frame, inside a movie clip placed on scene 1:

stop ();
stopAllSounds ();
setProperty ("playing1", _visible, "1");
setProperty ("playing2", _visible, "0");
setProperty ("selected", _visible, "0");
song = new Sound();
song.attachSound("sound1");
song.start(0, 999);


Button 1:
on (release) {
&nbsp &nbsp &nbsp &nbsp stopAllSounds ();
&nbsp &nbsp &nbsp &nbsp setProperty ("playing1", _visible, "1");
&nbsp &nbsp &nbsp &nbsp setProperty ("playing2", _visible, "0");
&nbsp &nbsp &nbsp &nbsp setProperty ("selected", _visible, "0");
song = new Sound();
song.attachSound("sound1");
song.start(0, 999);
}

Button 2:
on (release) {
&nbsp &nbsp &nbsp &nbsp stopAllSounds ();
&nbsp &nbsp &nbsp &nbsp setProperty ("playing1", _visible, "0");
&nbsp &nbsp &nbsp &nbsp setProperty ("playing2", _visible, "1");
&nbsp &nbsp &nbsp &nbsp setProperty ("selected", _visible, "0");
song = new Sound();
song.attachSound("sound2");
song.start(0, 999);
}

Button 3:
on (release) {
&nbsp &nbsp &nbsp &nbsp stopAllSounds ();
&nbsp &nbsp &nbsp &nbsp setProperty ("playing1", _visible, "0");
&nbsp &nbsp &nbsp &nbsp setProperty ("playing2", _visible, "0");
&nbsp &nbsp &nbsp &nbsp setProperty ("selected", _visible, "1");
song = new Sound();
song.attachSound("sound3");
song.start(0, 999);
}


All I want this to do is keep playing the track the user selected, and not have to reset everytime the main scene is loaded...

Thanks in advance

Ryan

I am not Jubba
April 30th, 2002, 05:07 AM
what is the movie for? is it an animation? or a website? if its an animation, I'm not sure, if its a website, DON"T USE SCENES!!!