Reputation:
A silly question, but I spent an hour trying to find it: I created a symbol, and named it symbol_a. How can I get this symbol name from an instance? If I use
myInstance.name
I get the instance name and not the symbol name......
Thanks in advance,
Edward
Upvotes: 3
Views: 3482
Reputation: 3548
This will return the name of the "symbol" (String).
getQualifiedClassName(yourSymbolInstance);`
This will give you the Class Object of your instance.
var c:Class=yourSymbolInstance.constructor;
addChild(new c());
If you don't export your symbol, the symbol name will be MovieClip.
Upvotes: 4
Reputation: 9480
I don't think it's possible to get a symbol name using AS3.
Btw. why do you need it really?
Upvotes: 1