Hi guys, I need some help on a problem, I have a tune that I want to play. I’ve got it playing from the start of the movie. I have a sound on and of switch which set a variable from 1 to 0
on the switch release.
Problem is when I enter a new scene the music gets switched on again. heres the switch code. I have a variable called “playing” which I use to store the value of 1 == play and 0 == stop.
I set this variable once at the start of my movie to 1 (i.e play)
on (release) {
if (Number(playing) == 0) {
stopAllSounds();
tellTarget ("/tune") {
gotoAndStop(“Stop”);
}
playing = 1;
} else {
tellTarget ("/tune") {
gotoAndStop(“Play”);
}
playing = 0;
}
}
Thanks for your help guys.
