Hi
I have mute button with class linked to this mc in the library

package lib
{
     import flash.display.*;
    import flash.events.*;
    import flash.utils.*;
        import flash.media.*;

 public class MuteControl extends flash.display.MovieClip
    {
        private var _so:SoundTransform;
        public function MuteControl()
        {
                        
                        _so=new SoundTransform();
                        _so.volume = 1;
                        soundTransform=_so;
                        this.addEventListener(MouseEvent.CLICK, 
muteControlButton);
                        this.buttonMode = true;
                        this.mouseChildren = false;
                return;
        }



      private function muteControlButton(e:MouseEvent):void {
                        if (_so.volume==1){
                                _so.volume=0;
                                e.target.gotoAndStop(2);
                        } else {
                                _so.volume=1;
                                e.target.gotoAndStop(1);
                        }
                        this.soundTransform = _so;  //nothing changes
}

                
                
    }

}

muteControlButton function works correctly but sound does not change.
Sound file attached on Timeline. What is wrong?

Please advice.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to