• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

get parent of e.target.name

Participant ,
Jul 16, 2009 Jul 16, 2009

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.

TOPICS
ActionScript

Views

4.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 16, 2009 Jul 16, 2009

function getParentName(e:MouseEvent):void{

     trace(e.currentTarget.parent.name);

};

round_mc.delete_mc.addEventListener(MouseEvent.MOUSE_UP, getParentName,false,0,true);

Votes

Translate

Translate
Participant ,
Jul 16, 2009 Jul 16, 2009

Copy link to clipboard

Copied

Sorry mc name was different than actionscript code. problem solved.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 16, 2009 Jul 16, 2009

Copy link to clipboard

Copied

LATEST

function getParentName(e:MouseEvent):void{

     trace(e.currentTarget.parent.name);

};

round_mc.delete_mc.addEventListener(MouseEvent.MOUSE_UP, getParentName,false,0,true);

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines