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) {
        stopAllSounds ();
        setProperty ("playing1", _visible, "1");
        setProperty ("playing2", _visible, "0");
        setProperty ("selected", _visible, "0");
song = new Sound();
song.attachSound("sound1");
song.start(0, 999);
}
Button 2:
on (release) {
        stopAllSounds ();
        setProperty ("playing1", _visible, "0");
        setProperty ("playing2", _visible, "1");
        setProperty ("selected", _visible, "0");
song = new Sound();
song.attachSound("sound2");
song.start(0, 999);
}
Button 3:
on (release) {
        stopAllSounds ();
        setProperty ("playing1", _visible, "0");
        setProperty ("playing2", _visible, "0");
        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
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) {
        stopAllSounds ();
        setProperty ("playing1", _visible, "1");
        setProperty ("playing2", _visible, "0");
        setProperty ("selected", _visible, "0");
song = new Sound();
song.attachSound("sound1");
song.start(0, 999);
}
Button 2:
on (release) {
        stopAllSounds ();
        setProperty ("playing1", _visible, "0");
        setProperty ("playing2", _visible, "1");
        setProperty ("selected", _visible, "0");
song = new Sound();
song.attachSound("sound2");
song.start(0, 999);
}
Button 3:
on (release) {
        stopAllSounds ();
        setProperty ("playing1", _visible, "0");
        setProperty ("playing2", _visible, "0");
        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