A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 28 of 28

Thread: Help with game.

  1. #21
    Senior Member Pazil's Avatar
    Join Date
    Sep 2006
    Location
    Ontario, Canada
    Posts
    913
    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!

  2. #22
    Junior Member
    Join Date
    Mar 2009
    Posts
    21
    Quote Originally Posted by Pazil View Post
    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.

  3. #23
    Pencil Farmer cadin's Avatar
    Join Date
    Jul 2006
    Location
    Vancouver BC
    Posts
    323
    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_FRAMEmoveObjects); 

  4. #24
    Junior Member
    Join Date
    Mar 2009
    Posts
    21
    Quote Originally Posted by cadin View Post
    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_FRAMEmoveObjects); 
    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.

  5. #25
    Pencil Farmer cadin's Avatar
    Join Date
    Jul 2006
    Location
    Vancouver BC
    Posts
    323
    Can you post the files?

  6. #26
    Junior Member
    Join Date
    Mar 2009
    Posts
    21
    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.

  7. #27
    Pencil Farmer cadin's Avatar
    Join Date
    Jul 2006
    Location
    Vancouver BC
    Posts
    323
    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.

  8. #28
    Junior Member
    Join Date
    Mar 2009
    Posts
    21
    Quote Originally Posted by cadin View Post
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center