deltajam
|
|
« on: March 04, 2009, 04:38:03 » |
|
I can't figure this out. I'm going to rip my hair out. My module is loading with one of the Fabrication examples I modified. "loading"
However, I can't add the module to the display list, because the ModuleEvent class won't fire anything back!
trace( moduleVO.url ); var moduleLoader:FlexModuleLoader = new FlexModuleLoader(); moduleLoader.id = moduleVO.getElementID(); moduleLoader.url = moduleVO.url; moduleLoader.router = applicationRouter; if (moduleVO.moduleGroup != null) { moduleLoader.moduleGroup = moduleVO.moduleGroup; moduleLoader.defaultRoute = moduleVO.moduleGroup; } else { moduleLoader.defaultRouteAddress = applicationAddress; } moduleLoader.addEventListener(FabricatorEvent.FABRICATION_CREATED, moduleCreated); moduleLoader.addEventListener(FabricatorEvent.FABRICATION_REMOVED, moduleRemoved); moduleLoader.addEventListener(ModuleEvent.READY, moduleReadyListener); trace( moduleLoader ); moduleLoader.loadModule();
My module loads, because my console says it does ... but I can never seem make it to this function:
private function moduleReadyListener( event:ModuleEvent ):void { trace( "module ready!" ); event.target.removeEventListener(ModuleEvent.READY, moduleReadyListener); moduleContainer.addChild(event.target as DisplayObject); }
any sugestions. I feel like this is something really simple. Why wouldn't the eventListener be ... listening?
|