user194504
user194504

Reputation:

Actionscript 3: How can I get the symbol name, and not the instance name

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

Answers (2)

OXMO456
OXMO456

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

Michal M
Michal M

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

Related Questions