public class Widget
public function test():void
var widgetClass:Class = flash.utils.getDefinitionByName("Widget") as Class;
var widgetInstance:Object = new widgetClass();
you could add:
to additional compiler options (and then everything will work ;))
1 person found this helpful
And to do 100 classes, reference them all in a single class and -includes
the one class, or list them all in a -config.xml file.
Can you tell me how to do this? I tried -load-config+=addonclasses.xml as a compiler argument. This is the content of addonclasses.xml:
I think if you are compiling app.mxml and you have the file named app-config.xml in the same folder it will use it automatically.