I’m working on a project of a game that has some minigames inside. The main game is made with flashpunk and it loads the minigames as separate swfs. Sometimes the minigames are also made with flashpunk, and that’s a problem apparently.
If the main game loads a minigame that is not made with flashpunk, everything goes well. Both swfs keep working (listening to key inputs and enter frame event). But when the minigame is made with flashpunk, the main game stop working.
I’m loading the external swfs with regular URLRequest + Loader flash classes:
urlRequest = new URLRequest(swfLocation);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded);
loader.load(urlRequest);
public function swfLoaded(event:Event):void {
FP.stage.addChild(loader);
}
Both the main swf and the minigame swf are made with flashpunk so their main classes extend engine and they have their own worlds and stuff.
Does anybody know what could be possibly causing this issue? What exactly would cause both swfs to not work individually? Is there something to do with them using the same stage or something?