/ Published in: ActionScript 3
simple how-to adding an event listener to a button or movieClip and trace the target name.
Expand |
Embed | Plain Text
btn.addEventListener(MouseEvent.MOUSE_CLICK, clickHandler); function clickHandler(e:MouseEvent):void { var obj = e.target.name; trace(obj) }
You need to login to post a comment.
