Not if you're just loading a view of something.  ModuleLoader just wraps up 
calls to ModuleManager

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Guy 
Morton
Sent: Thursday, November 06, 2008 12:49 PM
To: [email protected]
Subject: Re: [flexcoders] Re: Module initialisation


Thanks guys

Is there an advantage to using ModuleManager over ModuleLoader?

Guy

On 07/11/2008, at 4:51 AM, Alex Harui wrote:



If you're using moduleLoader there will also be a READY event, and that will 
indicate that the child is instantiated, and later the child will dispatch an 
UPDATE_COMPLETE when it is finally on screen and validated.

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Gus
Sent: Thursday, November 06, 2008 4:25 AM
To: [email protected]
Subject: [flexcoders] Re: Module initialisation


Hi Guy,

if you are using the ModuleManager to get the Module you have to
create the instance and add it to the application in the Module.Ready...

something like this:

private function onModuleReady(event:ModuleEvent):void
{
var child:DisplayObject = event.module.factory.create() as
DisplayObject;
//The child var will contain you module
if (child)
{
addChild(child);
}
}

if you are using the ModuleLoader, this is done in the ModuleReady,
but if you check the code, it creates the instances, fires the event
and then adds the module... so maybe this is whats happening...

Hopes this help
Gus



Reply via email to