Action script 3? Basically I have a flash movie clip button and want it to act as a switch to turn on and off a feature but I do not known how to do it so can some one please help me with this I am working on doing it in Action script 3 I known I need to use visibility = true or false to turn the item on or off but how can I get it to work like a light switch
<<<<<<<below is sample of code I have so far done for my button>>>>>>>>>>>>
// Btn4 Over function
function btn4Over(event:MouseEvent):void {
btn4.gotoAndPlay("over"); // go into btn4movie-clipp and play the over frame label
}
// Btn4 Out function
function btn4Out(event:MouseEvent):void {
btn4.gotoAndPlay("out");// go into btn4 movieclip and play the out frame label
}
// Btn4 Down function
function btn4Down(event:MouseEvent):void {
btn4.gotoAndPlay("down"); // go into btn4 movieclip and play the down frame label
// Btn4 listeners
btn4.addEventListener(MouseEvent.ROLL_OVER, btn4Over);
btn4.addEventListener(MouseEvent.ROLL_OUT, btn4Out);
btn4.addEventListener(MouseEvent.CLICK, btn4Down);
<<<<<<<below is sample of code I have so far done for my button>>>>>>>>>>>>
// Btn4 Over function
function btn4Over(event:MouseEvent):void {
btn4.gotoAndPlay("over"); // go into btn4movie-clipp and play the over frame label
}
// Btn4 Out function
function btn4Out(event:MouseEvent):void {
btn4.gotoAndPlay("out");// go into btn4 movieclip and play the out frame label
}
// Btn4 Down function
function btn4Down(event:MouseEvent):void {
btn4.gotoAndPlay("down"); // go into btn4 movieclip and play the down frame label
// Btn4 listeners
btn4.addEventListener(MouseEvent.ROLL_OVER, btn4Over);
btn4.addEventListener(MouseEvent.ROLL_OUT, btn4Out);
btn4.addEventListener(MouseEvent.CLICK, btn4Down);