Do you have an example of the xml?

Does it have actionscript in it, or is it just laid out components?  
Laying out components is easy... figuring out and running AS is quite  
a bit more difficult.

I've done some experiments with loading pseudo-mxml at runtime and  
displaying it, but there are some caveats.

First, you need to make sure any components you *MIGHT* use are  
compiled in the swf. I ended up having to do something like so in  
order for that to happen:

import mx.controls.Panel;

private var myNonExistingPanel:Panel;

Then you have to worry about setting properties and styles on the  
component, based on (usually) the attributes in the xml. Not using  
attributes but nested tags makes things a little bit more difficult.

Hope that helps a bit.

John



On May 13, 2007, at 6:28 PM, Austin Kottke wrote:

> Anyone have any ideas on how to take an entire Panel that is just  
> an xml
> file and then
> load this in flex 2 and then have it instantiate it? This is not a
> compiled SWF using the Modules package in flex, but
> just a simple xml file.
>
> I've done this with a Tree Control where I loaded in the xml and it
> generated the components at runtime, however
> I'm thinking of an entire set of code in MXML or XML that gets  
> loaded in
> and immediately created.
>
> I know there is a Apache MXML server on labs, but I was thinking that
> this is done just in flex.
>
> Anyone have any experience in this?
>
>
> --
> 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