Re: [flexcoders] Module and Application Communication.

2009-08-18 Thread Rick Winscot
Have you tested to see if this is a security / app domain issue?

Cheers,

Rick Winscot


On 8/17/09 1:24 PM, "cuttenv"  wrote:

>  
>  
>  
> 
> I have a rather straight forward question.
> I am creating a module like this:
> private var modInfo:IModuleInfo
> private var myModule:MyCustomMdoule;
> 
> //In creation complete of application
> modInfo = ModuleManager.getModule('myMod.swf');
> modInfo.addEventListener(ModuleEvent.READY, onModuleReady);
> modInfo.load();
> 
> //In tho onModuleReady command
> myModule = modInfo.factory.create() as MyCustomModule;
> moduleContent.addChild( myModule );
> myModule.addEventListener( 'customEventDispatchedByModule', onEvent );
> 
> //Inside my module there is
> dispatchEvent( new Event('customEventDispatchedByModule',true) );
> 
> Even though the code  for the dispatch event is running the handler never
> runs... am I doing something wrong?? or do module not dispatch events??
> 
>   
> 
> 
>> 



[flexcoders] Module and Application Communication.

2009-08-17 Thread cuttenv
I have a rather straight forward question.
I am creating a module like this:
private var modInfo:IModuleInfo
private var myModule:MyCustomMdoule;

//In creation complete of application
modInfo = ModuleManager.getModule('myMod.swf');
modInfo.addEventListener(ModuleEvent.READY, onModuleReady);
modInfo.load();

//In tho onModuleReady command
myModule = modInfo.factory.create() as MyCustomModule;
moduleContent.addChild( myModule );
myModule.addEventListener( 'customEventDispatchedByModule', onEvent );

//Inside my module there is
dispatchEvent( new Event('customEventDispatchedByModule',true) );

Even though the code  for the dispatch event is running the handler never 
runs... am I doing something wrong?? or do module not dispatch events??