var shapeClass:Class; currentShape = "Circle"; //class name in the library (linkage) shapeClass = getDefinitionByName(currentShape) as Class; var shape:MovieClip; shape = new shapeClass();