Test for dynamic class creation in JS. AS3 :

var obj : Class = MyReallyCoolClass;
var myInstance : MyReallyCoolClass = new obj() as MyReallyCoolClass