barliesque
January 14th, 2008, 03:05 AM
Is there a way to dynamically typecast a new instance? Maybe something like the following...?
var myClass:String = "blah";
var inst = new[myClass]();
I've invented the above syntax--though I'd be delighted if it turned out to work! For clarity, I would hope for something like the above code to be synonymous with the following:
var inst:blah = new blah();
...So is it possible to dynamically specify a class name when creating a new instance?
var myClass:String = "blah";
var inst = new[myClass]();
I've invented the above syntax--though I'd be delighted if it turned out to work! For clarity, I would hope for something like the above code to be synonymous with the following:
var inst:blah = new blah();
...So is it possible to dynamically specify a class name when creating a new instance?