Perhaps you're getting an error on load; probably due to the path.  Try adding 
an event listener for ModuleEvent.ERROR.

Also, this line is missing an equal sign:

var test:ITest ITest(this._moduleLoader.child);

Should be:

var test:ITest = ITest(this._moduleLoader.child);

-TH

--- In flexcoders@yahoogroups.com, "method_air" <loudjazz@...> wrote:
>
> Can anyone explain why ModuleLoader.child is null in the module event 'ready' 
> event listener:
> 
> this._moduleLoader = new ModuleLoader();
> this._moduleLoader.url = "ImageComparisonModule.swf"; // 
>                               
> this._moduleLoader.addEventListener(ModuleEvent.READY, onReady);
> 
> private function onReady(e:ModuleEvent):void
> {
>      var test:ITest ITest(this._moduleLoader.child); // null                  
> }
> 
> Module code:
> 
> <?xml version="1.0" encoding="utf-8"?>
> <s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"; 
>                 xmlns:s="library://ns.adobe.com/flex/spark" 
>                 xmlns:mx="library://ns.adobe.com/flex/mx" 
>                implements="com.storefront.interfaces.controller.ITest"
>                 >
>       <fx:Declarations>
>               <!-- Place non-visual elements (e.g., services, value objects) 
> here -->
>       </fx:Declarations>
>       
>       <s:VGroup width="100%" />
> </s:Module>
> 
> Cheers,
> 
> Philip
>


Reply via email to