[flexcoders] Re: Module hell... Flex 3

2008-07-15 Thread Gus
Have you tried setting the listeners in the execute method? and also, you should pass the module url inside the event... //in the event dispatch var loadEvent : new LoadTestEvent(); loadEvent.url = "TestModule.swf"; loadEvent.dispatch(); //in the command public function execute(event:CairngormEve

[flexcoders] Re: Module hell... Flex 3 - Solved, but strange

2008-01-30 Thread dbronk
I had tried moving my statements in just about every sequence I could think of and always the same issue. I realize it had to be some sort of timing issue since about one out of every 5th or 6th time it would work on the first click. I decided to move my implementation to use ModuleManager instea

[flexcoders] Re: Module hell... Flex 3

2008-01-29 Thread Gaurav Jain
It sounds like in the first load the eventListener is not getting registered before the loadModule() method. Subsequent calls work because of the event listener added from the first attempt. I suggest you move moduleLoader.id = moduleName; moduleLoader.url = moduleName; to the very end. Than

[flexcoders] Re: Module hell... Flex 3

2008-01-29 Thread dbronk
I've tried adding the event listener before and after with no change. The onModuleLoad does not get called on the first execution of the code. That is my problem. It works every time after the first execution. I've debugged down to where I think the problem is, just don't know why. On the firs