Reputation: 13517
Can someone please help quickly mute or unmute the stage volume in Flash CS3 using AS 3.0.
Thanks
Upvotes: 4
Views: 14813
Reputation: 61
Put this line into your script when you want to stop the sound:
SoundMixer.stopAll();
Upvotes: 2
Reputation: 4468
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);
Upvotes: 13