alokwww
Technical User
- Dec 25, 2002
- 86
I have a sound I'm playing from frame one. I want to create a button that if the sound is playing will stop the sound and if the sound is stopped will start the sound. The actions I have on frame one are:
firstSound=new Sound();
firstSound.attachSound("firstSound01"
;
{
_root.firstSound.start(0,999);
playing=true
}
The actions I have on the button are:
on (press) {
if (playing=true) {
_root.firstSound.stop("firstSound01"
playing=false
}
if (playing=false) {
_root.firstSound.start("firstSound01"
playing=true
}
}
This still doesnt work. Can anyone tell me what I'm doing wrong.
Also, is there a way to change the button (symbol name is ButtonMute) color to blue if the sound is stopped and to yellow if the sound is started?
Thanks
-Alok
firstSound=new Sound();
firstSound.attachSound("firstSound01"
{
_root.firstSound.start(0,999);
playing=true
}
The actions I have on the button are:
on (press) {
if (playing=true) {
_root.firstSound.stop("firstSound01"
playing=false
}
if (playing=false) {
_root.firstSound.start("firstSound01"
playing=true
}
}
This still doesnt work. Can anyone tell me what I'm doing wrong.
Also, is there a way to change the button (symbol name is ButtonMute) color to blue if the sound is stopped and to yellow if the sound is started?
Thanks
-Alok