I have a FLA file with objects in the library that I set as “classes” (in CS3, right-click an item in the library, select properties, make sure it is set to export for actionscript and has a class name)
Call MyClass for this exercise.
If I publish FLA in SWC and SWF:
I can load SWC statically and create an instance of "MyClass" by simply doing:
var inst: Myclass = new MyClasS ();
Now the problem is: I would like to be able to do this at runtime by loading the SWF file using the loader object.
I understand how to access instances that were manually created in FLA before publishing, but what I want to do is create new instances of the "MyClass" class.
I can get a “MovieClip” representing the swf file, I can add it to my display list, but it looks like I can't get into the classes contained in it. (Hope this makes sense)
Any suggestions on how to attack this would be greatly appreciated.
source
share