I have a string that at runtime contains the name of the class I want to create. How can I do it?
I read suggestions on using flash.utils.getDefinitionByName() :
var myClass:Class = getDefinitionByName("package.className") as Class; var myInstance:* = new myClass();
However, this gives me the following error:
Bug Fix [Fault], information = ReferenceError: Error # 1065: Variable variable name not defined.
source share