I am working on a Flash project with multiple scenes. I use the function:
function gameloop(e:Event) {
to add my functions in to one scene, but when switching the scene I am rained on with errors because the objects used in the other scene are no longer on screen. Is there an opposite to the code I pasted here to take functions out of the game loop for my other scenes?
function gameloop(e:Event) {
if(currentFrame != 2){
return;
}
}
Check currentFrame in the loop.