title: Adobe Flash/ Animate muting particular audio
body: <p>I am in <em>desperate</em> need of help! I have a mute toggle button that I made following a tutorial on youtube in Adobe Animate/Flash using action-script 3.0 and it mutes everything as it is supposed to. However, I now need it to only mute the background music as it is muting my videos as well! How can I alter the code to either make sure only the background sound is muted and not the video? </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>function setMute(vol)
  {
   var sTransform:SoundTransform = new SoundTransform(1,0);
   sTransform.volume = vol; 
   SoundMixer.soundTransform = sTransform;
  }
  
  
  var Mute:Boolean = false;
  
  mute_btn.addEventListener(MouseEvent.CLICK,toggleMute_btn);
  
  function toggleMute_btn(event:Event){ if(Mute)
  {
   Mute = false; setMute(1);
  soundLines.gotoAndStop(1);
  }
  else
   { Mute = true; setMute(0);
  soundLines.gotoAndStop(2); 
   }
  }</code></pre>
  </div>
  </div>
  </p>