Enumerate exported classes/symbols
Hi all,
When I load an swf dynamically using the Loader, is there any way that I can retrieve the symbols that are exported as as3 classes?
I know I can instantiate the symbols when I know the classname using
loaderInfo.applicationDomain.getDefinition(fullyQualifiedName) as Class
But I can't find something like
applicationDomain.getDefinitions() which would result an array of fully qualified classnames, like
["com.company.app.Symbol1", com.company.app.Symbol2",..]
so I can instantiate symbol1 and add it to the stage like
var cls:Class = loaderInfo.applicationDomain.getDefinition("com.company.app.Symbol1") as Class
var obj:*;
try {
obj=new cls;
} catch (error:Error) {
trace('Cannot instantiate the class');
}
stage.addChild(obj);
If this is impossible, please let me know too. In that case I have to fill my database with all the symbols per swf and load that too.
But it's a lot more work creating and maintaining duplicate data.
I know there are tools out there that can show everything that's contained in an swf, but I don't know if they're looking at the binary data.
TIA
Ronald