Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 530
Anriëtte Myburgh Avatar asked Dec 07 '22 06:12

Anriëtte Myburgh


2 Answers

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);
like image 116
Branden Hall Avatar answered Dec 09 '22 20:12

Branden Hall


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

SoundMixer.stopAll();
like image 41
Tareq Rahman Avatar answered Dec 09 '22 19:12

Tareq Rahman