R – Adding flex components using xml

actionscript-3apache-flexmxmlxml

I have a dozen different custom components in my flex app.
I want to use an external xml config file to load the components at run-tine.
Can someone tell me whats the best way to architect this? I want to load these components and add dataProviders and event liseners to them at runtime. A brief example will greatly help.

Best Answer

check out this demo from adobe. It uses XML that dynamically loads the "pods" at run time.

http://examples.adobe.com/flex3/devnet/dashboard/srcview/index.html