--- In flexcoders@yahoogroups.com, Rob Kunkle <r...@...> wrote: > > Hi Lorenzo - > > What you want to do is use the "ready" event of the module loader to > add event listeners to your module. So in your main application, you > want something like this: > > > > private function moduleReadyHandler(event:Event):void > { > > if(moduleLoader.child is DesignBrowser) > { > > moduleLoader.child.addEventListener(DesignBrowser.DESIGN_SELECTED, > designSelectedHandler); > } > } > > private function designSelectedHandler(event:Event):void > { > trace('design selected' + event.target.name); > } > > ... > > <mx:ModuleLoader > ready="moduleReadyHandler(event)" > id="moduleLoader"/> > > > In my application, I have a module called "DesignBrowser". It > dispatches a "DESIGN_SELECTED" event when the user selects a design. > The module then loader listens for this event because I added an > EventListener to the child of the module loader during the "ready" > event. > > Hope this helps! > > Rob > > > > > On Jan 27, 2009, at 7:20 AM, thelordsince1984 wrote: > > > --- In flexcoders@yahoogroups.com, "thelordsince1984" <loreboa@> > > wrote: > > > > > > Hi, > > > > > > i have a problem in my app.. > > > > > > i have a main application and here i create a custom module, a > > > titlewindow with a close button... > > > when i click the button i would unload the module...is it possible > > to > > > listen for module events from the main app? how can i rich this > > goal? > > > > > > Thanks in advance > > > > > > Regards Lorenzo > > > > > Anybody can help me? > > > > Suppose that i have a module.This module contains a title window and a > > close button. > > > > From the main app i load this module through a ModuleLoader.. > > > > then when i click in the close button module i would unload the > > module..how to do this? if i fire an event from the module the event > > remains into the module, is it true?the main app can't catch the > > event... > > > > please help me... > > > > > > > > > thanks Rob
you give me a big help.. can i ask you an ther question? i would implement an application like igoogle..but with flex! to do this i have some modules... my app structure looks like this: 1) the main app 2) a main panel (this a child of the main app) 2) n modules so when i start the main app i would load modules on demand into the main panel and then i would drag and drop them to change their position..is it possible to do? can you give me some guide lines? And is it possible to write my personal ModuleLoader in Actionscript3?Can i create i new one and then use it to load all or some of the modules tha i have created? Thanks, thanks thanks Regards Lorenzo