Flash CS3 + AS 3.0 Mute and unmute stage volume

Anriëtte Myburgh picture Anriëtte Myburgh · Sep 1, 2009 · Viewed 14.8k times · Source

Can someone please help quickly mute or unmute the stage volume in Flash CS3 using AS 3.0.

Thanks

Answer

Branden Hall picture Branden Hall · Sep 1, 2009

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);