Class constructors

Hi all

Not sure if this is possible but it has been annoying me for the least few days.

Basically im aware i can do this to instantiate a class

var CONSTRUCTOR:Function = SOME_VARIABLE
var t:CLASS_NAME = new CONSTRCUTOR();

However, if i pass in a string for the SOME_VARIABLE , is there anyway i can get the above to work? If i pass a string in i either get no error, or the fact that the datatype is incorrect.

Im using an xml file to build up an interface. but the value of SOME_VARIABLE is passed in from the xml file as a string . I want to be able to detrmine which class to create from this string.

Hope that makes sense, and someone can help me out.

Thanks