Stop all sounds as3? Help
When the game starts. I have toggle button. I can play a sound or stop sound. When i play the sound, of course its not muted so even if i go to the next page. I can reason out that the sounds will still play.
But if i press the no sound,so it means it must be muted.. on the first screen, the sound stops. But when I go the next frames and to others. The sounds are playing. The sound on the starting screen
was like
var test:Sound = new NameOfSound();
but in the next frames.. the sound is in the frame itself.. no declaring like the first screen..
and also some sounds is playing when something happens or for example if the bullet hits the target collsion..sound play..
i tried to have solution like on the first screen if for example it is muted.. ill set it to trueStop.. then on the next frames.. i would put:
if(trueStop == true){
SoundMixer.stopAll();
}
that way the frame sounds stopped and working.. but the sounds attach to the function when like i said if a collision happens,, the sound is still playing.. arrgghh i cant explain clearly.. i hope you understand my problem..
any ideas?
