hi, i am trying te recieve the class with only having the name of the class so example:
var className:String = "TheClass";
var theClass = new className();
is this possible?
hi, i am trying te recieve the class with only having the name of the class so example:
var className:String = "TheClass";
var theClass = new className();
is this possible?
You'll need to use flash.utils.getDefinitionByName for it and supply the full qualified name. Try this:
import flash.utils.getDefinitionByName;
var cls:Class = getDefinitionByName("com.domain.project.TheClass") as Class;
var instance:Object = new cls();