You can use the player's getClassByName() function, which is in the flash.util package. Pass it a fully qualified class name like "mx.controls.Button":
createChild(getClassByName("mx.controls.Button")); - Gordon -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Brendan Meutzner Sent: Wednesday, January 18, 2006 9:13 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] addChild from String Hi All, I'd like to provide a String value which represents the DisplayObject class I want to create dynamically with addChild. Has anyone accomplished this? This would be equivalent to createChild(findClass("Button")) in AS2... Thanks, Brendan -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/