Skip to main content
Known Participant
October 27, 2008
Question

call name

  • October 27, 2008
  • 2 replies
  • 505 views
How can I call the instance name of a mc?
For example in AS2 I would do: this._name
How do I do in AS3?
This topic has been closed for replies.

2 replies

kglad
Community Expert
Community Expert
October 27, 2008
no.

how did you create your movieclip mc? if you used code, mc has no name property until you assign one. if you created mc in the authoring environment, it's instance name is mc.
kglad
Community Expert
Community Expert
October 27, 2008
if you want to get a reference to a movieclip using its instance name use the getInstanceByName() method applied to the movieclip's parent.
Known Participant
October 27, 2008
Ok, so you mean like if the mc I want the instance name of is in "mc_top" I would write something like mc_top.getChildByName()
I can't get it to find the name..