Hi Danny, mx.utils.ClassFinder.findClass("SomeClass") returns the constructor function for a class.
e.g. var className:String = 'String'; var cls:Function = mx.utils.ClassFinder.findClass(className); var object:Object = new cls(); Hope that helps, Ian On 6/1/06, Danny Kodicek <[EMAIL PROTECTED]> wrote:
I want to have a function makeObject(tType:String) which returns an object of class tType. So makeObject("Array") should return a new Array object. Any good way to do this? I'm sure it's something simple. And before you ask, yes, there is a reason why I need to do it this way... Danny _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
_______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com