I have already taken such precautions.

See my code is something like this,

Note : As per module life cycle, if module loads fully
( i.e.   byetsLoaded = bytesTotal )
Module has fully arrived at client side. 
And there must be a ModuleEvent.SETUP  dispatched in between the load / 
progress of same meodule.
(as per my understanding )

//***** code snippet start   *****


private var moduleInfo:IModuleInfo; // variable at class level

// some function below

{
moduleInfo = ModuleManager.getModule( moduleURL );
moduleInfo.addEventListener( ModuleEvent.SETUP, onModuleSetup);
moduleInfo.addEventListener( ModuleEvent.PROGRESS, onModuleProgress);
moduleInfo.addEventListener( ModuleEvent.READY, onModuleReady );
moduleInfo.addEventListener( ModuleEvent.ERROR, onModuleError );

moduleInfo.load(ApplicationDomain.currentDomain);
}  //function ends


protected function onModuleSetup(moduleEvent : ModuleEvent ) : void
{
  Alert.show(moduleEvent.type ,"Module Setup Event");   
}
                        
protected function onModuleProgress(moduleEvent : ModuleEvent ) : void
{
  Alert.show(moduleEvent.bytesLoaded +" / "+
    moduleEvent.bytesTotal +" bytes ","Module Progress Event"); 
}
                        
protected function onModuleError ( moduleEvent : ModuleEvent) : void
{
Alert.show(moduleEvent.errorText+" ::: " +   moduleEvent.type.toString()); 
}

protected function onModuleReady( moduleEvent:ModuleEvent ):void
{
        var moduleInfo:IModuleInfo = moduleEvent.module;
    var objModuleInfo : Object = moduleInfo.factory.info();
        var moduleObject: Object = moduleInfo.factory.create();

        if(moduleObject != null)
        {
                //some business logic
                //
        }
}

//***** code snippet end   *****

--- In [email protected], kris range <krisra...@...> wrote:
>
> You might want to look at this:
> 
> http://bugs.adobe.com/jira/browse/SDK-14021
> 
> Make sure your module variable isn't local and instead saved somewhere so it
> isn't garbage collected!
> 
> 
> On Wed, Mar 10, 2010 at 4:11 PM, Peeyush Tuli <peeyus...@...> wrote:
> 
> >
> >
> > have you added an error event listener to the IModuleInfo reference from
> > getModule to see if there is an error in loading the complete module?
> >
> >
> > On Wed, Mar 10, 2010 at 6:45 PM, Mayur <ondemand_ma...@...> wrote:
> >
> >>
> >>
> >> I am having a problem with Module - SETUP event is not dispatched.
> >>
> >> Though I am getting the mdoule's PROGRESS event fully - continuous until
> >> all the bytes of the specified module are loaded.
> >>
> >> That means, the required module has fully reached at client side but I
> >> still I am not getting module's READY event.
> >>
> >> I am using ModuleManager to load modules dynamically with RSLs.
> >>
> >> Thanking in Advance,
> >>
> >> Mayur
> >>
> >>
> >
> >
> >
>


Reply via email to