-
Senior Member
What line of code is the error in. It should say when it shows the error...
WIP-ZOMBIES
I love vegetarians! More meat for the rest of us!
-
 Originally Posted by Pazil
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.
-
Pencil Farmer
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);
-
 Originally Posted by cadin
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);
Nope still sais the same 
It has no compile errors and it loads that frame but the objects get stuck at the top of the screen and even when removing the objects it still comes up with that error.
-
Pencil Farmer
-
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.
-
Pencil Farmer
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.
-
 Originally Posted by cadin
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.
My Files are too big to upload
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|