I can isolate where the code is, approximately, when it crashes (as it happens at a specific time) but I am unable to determine WHY it crashes or even WHAT FUNCTION that’s doing it.
Best I can isolate, it is something in this chunk, as the crash will happen on the completion (or roughly within that time period) of the tween.
else if(levelNum == 2) {
paused = true;
SoundMixer.stopAll();
slimeStyle = 0;
Tweener.addTween(player, {x:1300, y:300, time:1, transition:"easeInBack", onCompleteScope:this,onComplete:function() {
container.removeChild(player);
player = new Honeybee2();
container.addChild(player);
player.stop();
player.x = -200;
player.y = 300;
player.mute = mute;
showSecondHelp();
bg.nextFrame();
}});
}
...
private function showSecondHelp() {
honeyMeter.y = -200;
lvTwoInstructions.continueBtn.addEventListener(TouchEvent.TOUCH_END, hideSecondHelp);
lvTwoInstructions.visible = true;
lvTwoInstructions.alpha = 0;
Tweener.addTween(l2inst, {alpha:1, time:0.5});
}