What line of code is the error in. It should say when it shows the error...
Printable View
What line of code is the error in. It should say when it shows the error...
It doesnt say, it just sais that under the Objects tab.
I've tried shifting code around but doesnt help, I can get it to go back a frame or I can make objects stop on the frame it's on but I cant get it to stop the moveObjects bit as it still wants to run it on the next frame.
Maybe my code is set up wrong.
You still have the ENTER_FRAME event triggering moveObjects on every frame.
Since it's calling items that are no longer on the stage in frame 3 (I'm assuming) you're getting the null object error.
You need to remove the ENTER_FRAME event before you kick over to the new frame:
PHP Code:removeEventListener(Event.ENTER_FRAME, moveObjects);
Can you post the files?
Ok I ran the game with the debug mode, I've never used it before which Im sure is a major mistake when coding...anyway I found that it is on line 250 which is:
coinDisplay.text = ""+coin;
presentDisplay.text = ""+present;
foodDisplay.text = ""+food;
So when I block them out it loads the next page but still drops the objects.
what should I do with those and how can I stop the objects altogether.
I don't mean to keep harping on the same thing (especially since I'm probably wrong), but it doesn't seem like you've properly stopped that ENTER_FRAME event.
If you post the files I'll take a look.