Actionscript3 button tip

Posted by Mango on Stack Overflow See other posts from Stack Overflow or by Mango
Published on 2010-04-27T23:31:52Z Indexed on 2010/04/27 23:33 UTC
Read the original article Hit count: 157

Filed under:

Please, someone could help me?

I need to send the parameter ad_mc by the command:

ad_btn.addEventListener (MouseEvent.MOUSE_MOVE, MouseOver);

to use the same function for all buttons

function MouseOver(evt:MouseEvent):void{
 ad_mc.gotoAndPlay("on");
}

function MouseOut(evt:MouseEvent):void{
 ad_mc.gotoAndPlay("off");
}

ad_btn.addEventListener(MouseEvent.MOUSE_OUT, MouseOut);
ad_btn.addEventListener(MouseEvent.MOUSE_OVER, MouseOver);

If I wanted to send the parameter ad_btn I would use:

MovieClip (evt.target). GotoAndPlay ("on");

but is not the case

© Stack Overflow or respective owner

Related posts about actionscript-3