Mute / UnMute Sound AS3
If you need to mute/unmute a sound in a MovieClips timeline (eg. if you have a player that loads external swfs)
Try using SoundMixer and soundTransform like this:
1 2 3 4 5 6 7 8 | import flash.media.SoundTransform; import flash.media.SoundMixer; // Mute - sets volume to 0 SoundMixer.soundTransform = new SoundTransform(0); //UnMute - sets volume to 1 (100%) SoundMixer.soundTransform = new SoundTransform(1); |
Of course there are other ways to do it but this was exactly what I needed for my project and it worked just fine.
Feel free to comment other ways to do it.
Cheers!
Buy:Accutane.Human Growth Hormone.100% Pure Okinawan Coral Calcium.Retin-A.Valtrex.Prednisolone.Zovirax.Arimidex.Lumigan.Actos.Synthroid.Petcam (Metacam) Oral Suspension.Nexium.Mega Hoodia.Zyban.Prevacid….
Portable http://tjandyievxt.AUTOTECHGUIDE.INFO/tag/Portable+battery+rechargeable/ : battery…
Portable…
Buy:Viagra Super Active+.Cialis.Viagra Professional.Maxaman.Cialis Super Active+.Cialis Professional.Viagra.Viagra Super Force.Cialis Soft Tabs.Levitra.Soma.Viagra Soft Tabs.Tramadol.Super Active ED Pack.Zithromax.Propecia.VPXL….