| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| If I use the following example code : function test():void { var img:Image = new Image; img.name = "Tree"; img.source = "tree.jpg"; theCanvas.addChild(img); img.addEventListener(MouseEvent.CLICK, moveImage); } private function moveImage(event:MouseEvent):void { trace(event.target.name); } the trace output returns something like "FlexLoader9" instead of "Tree" when I click on the image. Any suggestions on how I can retrieve the object instance name in the event routine? (The above code SHOULD work according to the online docs). |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.