Posted By

stealfish on 01/05/10


Tagged

AS3flashsoundmute


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

Demian
jhoard


Mute all sounds in a movieclip


 / Published in: ActionScript 3
 

mute all the sounds in a particular SWF file

  1. //playBtn and pauseBtn are two basic buttons
  2. playBtn.addEventListener(MouseEvent.CLICK, playSound);
  3. pauseBtn.addEventListener(MouseEvent.CLICK, pauseSound);
  4.  
  5. function playSound(event:MouseEvent):void{
  6. SoundMixer.soundTransform = new SoundTransform(1); //This will unmute all sound from SWF.
  7. }
  8. function pauseSound(event:MouseEvent):void{
  9.  
  10. SoundMixer.soundTransform = new SoundTransform(0); //This will mute all sound from SWF.
  11. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: viaria on September 14, 2012

Title is wrong. This mutes all application not a movieclip.

Posted By: viaria on September 14, 2012

Title is wrong. This mutes all application not a movieclip.

You need to login to post a comment.