Posted by sortofme on March 11th, 2008
sometimes, you want to know the instances class name or the superclass's name. AS3 offers a new function called getQualifiedClassName (flash.utils.getQualifiedClassName) to do just that:
Actionscript:
-
var sprite:Sprite = new Sprite();
-
trace(getQualifiedClassName(sprite)); // "flash.display::Sprite"
-
-
//or to retrieve the name of the super class, use:
-
trace(getQualifiedSuperclassName(sprite)); // "flash.display::DisplayObjectContainer"
If you actually want to sieve through plenty of info about your instance, try describeType() (flash.utils.describeType).
Actionscript:
-
var sprite:Sprite = new Sprite();
-
var spriteDescription:XML = describeType(sprite);
-
trace (spriteDescription);
try to see....(loads of data coming out here...)
what also fits in here is the use ofgetDefinitionByName()(flash.utils.getDefinitionByName).
Recent Comments