Can someone please help quickly mute or unmute the stage volume in Flash CS3 using AS 3.0.
Thanks
What you want is the SoundMixer class. Just set it's soundTransform object like this:
Mute:
SoundMixer.soundTransform = new SoundTransform(0);
Unmute:
SoundMixer.soundTransform = new SoundTransform(1);
Put this line into your script when you want to stop the sound:
SoundMixer.stopAll();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With