Copy link to clipboard
Copied
Hi,
How would you get the name of the parent of a movieclip? Any ideas? below is only some of the options I tried to trace.
function getParentName(e:MouseEvent):void{
trace(e.target.parent.name);
trace(parent(e.target));
trace(this.parent(e.target.name));
// want it to trace round_mc
};
round_mc.delete_mc.addEventListener(MouseEvent.MOUSE_UP, getParentName,false,0,true);
thanks for any help.
function getParentName(e:MouseEvent):void{
trace(e.currentTarget.parent.name);
};
round_mc.delete_mc.addEventListener(MouseEvent.MOUSE_UP, getParentName,false,0,true);
Copy link to clipboard
Copied
Sorry mc name was different than actionscript code. problem solved.
Copy link to clipboard
Copied
function getParentName(e:MouseEvent):void{
trace(e.currentTarget.parent.name);
};
round_mc.delete_mc.addEventListener(MouseEvent.MOUSE_UP, getParentName,false,0,true);