I have 3 buttons and when i click the button i need to know is position and is instance name… I try this to get the name. But the trace was allways “root1”.
bt1.addEventListener(MouseEvent.MOUSE_OUT, nameObject);
bt2.addEventListener(MouseEvent.MOUSE_OUT, nameObject);
bt3.addEventListener(MouseEvent.MOUSE_OUT, nameObject);
function nameObject(Event:MouseEvent) {
trace(""+ this.name);
}
Cam someone help me?
thanks