Try stopping the timer before unloading the module. Just removing the event listener will not stop the timer.
tried that it still did not work
What code did you use to stop the timer?
If there were an event I could add to the module which would trigger when it got unloaded, that would solve my problem, but there doesn't appear to be anything like
private function module_close(event:Event):void
OK, so I found a solution. No elegent but it works
1. Declare a public timer variable in the main application.
2. Before the module load in the main app do timer.start();
3. In the initilize section of the module (createionComplete) add
parentApplication.timer.removeEventListener(TimerEvent.TIMER,doNothing); // if you don't add this the events just become multiples of the calls
4. Use the timer as needed in the module
5. On unload of the module do a timer.stop();
This seems to work fine.
Better to listen for
Event.Removed_FROM_STAGE in the component where you added your timer and remove timer on handler function.