Hi,
this is not Starling related, just some problems with flex ModuleLoader class, but maybe someone will help me find solution.
I got Module loader defined like this:
<mx:ModuleLoader id="modLoader" error="errlog(event)" ready="modLoaded(event)" unload="moduleUnload(event)" />
Then at some point I start loading one module in start function:
startGame(1);
private function startGame(gameNr:int):void {
modLoader.loadModule("game/game" + gameNr + ".swf");
}
Function modLoaded() is being called and game starts.
When game1 ends I unload this module:
modLoader.unloadModule();
In the unload listener function I come back to the start:
private function moduleUnload(e:Event):void {
startGame(2);
}
But then nothing happens. Function startGame() is being called which I checked with trace statements. But function modLoaded() is not called again. Loading game1 works, but loading next modules doesn't. It doesnt matter if game1 or game2 is being called first. Both modules work fine when started first, but second module is not loading.