1 Reply Latest reply on Apr 7, 2008 4:52 PM by Gregory Lafrance

    Turn Off Sound Effect?

      Can anybody give me the code for turning off a sound effect with a button? Thanks.
        • 1. Re: Turn Off Sound Effect?
          Gregory Lafrance Level 6
          <?xml version="1.0"?>
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">
          import flash.media.*;

          public var sndCls:Class;
          public var snd:Sound = new sndCls() as Sound;
          public var sndChannel:SoundChannel;

          public function playSound():void {

          public function stopSound():void {
          <mx:Button label="play" click="playSound();"/>
          <mx:Button label="stop" click="stopSound();"/>