On 7/7/05, cazzaran <[EMAIL PROTECTED]> wrote: > You gathered correct. Unfortunately, what I was trying to do was a > sort of "runtime load" of an MXML component, which, in retrospect, I > should have known wasn't possible.
No, you wouldn't be the first and will not be the last. I remember thinkng along the same lines (ie i thought that was what FLEX major power feature was, much like Flash Communication Server where it stays connected to the server and simply *grows* the SWF...ahh but to dream). > I tried what you said verbatim, and it didn't work. However, I got the > jist of what you were saying; what I did was to simply assign an xmlns > to where my custom Panel innards are, and then load them all with a > long list of tags, each with the name of the MXML file, and an id to > match. The import isn't enough apparently, I need to actually > instatiate them. Sort of, i'm not sure it actually needs instantiation. An example was when i made SynergyFLEX, i include an XML file via mx:XML. Inside that XML file i place basically references to various classes.. eg: <viewpod name="blah" path="{com.mossyblog.viewpods.testPod}"/> That's all that was needed in order for the compiler to include that class as part of the overall SWF, so when the time came (which was much later in the application workflow) i would only *then* instantiate it via the createChild(). I thought i was pretty tricky finding that one, and if others knew about it already ...thankyou for sharing it! heh...*grumble* Note: I put the mx:XML file in mx:Application container. In truth you can put it / nest it anywhere you like within the application, provided the container its housed in is "known" to FLEX at compile time... > > Then, using your eval(resource) -- something I MUST thank you for, I > would have lost a lot of time on that one -- I link the ComboBox > selection to the component's id. aye, eval() doth saveith but for-warned! heh..it's been considered in many languages a "last resort" concept to apply in ones code (Well thats what i've been taught anyway).. > It's ugly, and I can see it making my app huge (potentially, anyway) > but there isn't much choice otherwise. Your actual "Classes" imported shouldn't consume a lot of memory (from my brief understanding of the flash player). Its only when you instantiate them (ie take them from their prototype state to a full visual) that it starts to get some memory behind it (especially with the current players performance issues). It'd be good to hear an offical wording on this via some of the MM engineers about importing classes vs instantiating them and the memory consumption between the two? -- Regards, Scott Barnes http://www.mossyblog.com -- 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/