/ Published in: ActionScript 3
Will trace the name of the display object that is actually receiving mouse events. Useful when the target of your mouse event is not what you are expecting. Oh, the fix 80% of the time is mouseChildren = false;
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
addEventListener(MouseEvent.MOUSE_DOWN, function(e:MouseEvent):void{trace(e.target+" : "+e.target.name);});