2 Replies Latest reply on Jul 16, 2010 9:20 AM by Flex harUI

    IModuleInfo does not dispatch events!

    Francesco_C Level 1

      Hi at all

       

      i've a problem with IModuleInfo (ModuleManager.getModule('Dummy1.swf');).

      IModuleInfo instance don't dispatch ModuleEvent.READY, ModuleEvent.SETUP, ecc... events.

       

      This is the code.

       

      <fx:Script>
              <![CDATA[
                  import mx.events.ModuleEvent;
                  import mx.modules.IModuleInfo;
                  import mx.modules.ModuleManager;

                 // call on creationComplete event.
                  protected function initApp():void
                  {
                      var _info:IModuleInfo =
                          ModuleManager.getModule('Dummy1.swf');
                     
                      _info.addEventListener(ModuleEvent.SETUP, getModuleInfoSetup);
                      _info.addEventListener(ModuleEvent.READY, getModuleInfoReady);
                     
                      _info.load(null, null, null, moduleFactory);               
                  }


                  protected function getModuleInfoSetup(evt:ModuleEvent):void
                  {
                      var _info:IModuleInfo = evt.target as IModuleInfo;
                     
                  }
                 
                  protected function getModuleInfoReady(evt:ModuleEvent):void
                  {
                      var _info:IModuleInfo = evt.target as IModuleInfo;
                     
                  }

       

       

      Any suggests?

      Thanks

       

      F.