Anriëtte Myburgh
Anriëtte Myburgh

Reputation: 13517

Flash CS3 + AS 3.0 Mute and unmute stage volume

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

Thanks

Upvotes: 4

Views: 14813

Answers (2)

Tareq Rahman
Tareq Rahman

Reputation: 61

Put this line into your script when you want to stop the sound:

SoundMixer.stopAll();

Upvotes: 2

Branden Hall
Branden Hall

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

Related Questions