We have mx.utils.ClassUtil.findClass which takes a string and will
return the class instance.  You still need to make sure that your custom
class gets linked into the SWF though by making sure there's a typed
reference to it somewhere.

Matt

-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of sinacapho
Sent: Thursday, April 20, 2006 11:25 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Dynamic create child in Flex1.5

Dear all,

i have a container that i need to create different custom component on
it. I find that the function createChild() only accept hard code
component. For example createChild(Button,undefined);

Does it have some method that can run like this?

var c_component = "Button";  // Actually it may be my custom component.

XX.createChild(c_component,undefined);

thx
capho






--
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




Reply via email to