Skip to main content
Participating Frequently
May 1, 2018
Answered

A bunch of TypeError: Error #1009: Cannot access a property or method of a null object reference. errors

  • May 1, 2018
  • 6 replies
  • 1007 views

TinyUpload.com - best file hosting solution, with no limits, totaly free

Click on the rocket = bring you to space, click again anywhere on stage use up down left right arrow keys to move, touch the saturn planet, tada... Errors

can someone look into my codes and tell me what is wrong that triggered all those bunch of errors? Thank you

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer Ned Murphy

The 1009 error indicates that one of the objects being targeted by your code is out of scope.  This could mean that the object....

 

- is declared but not instantiated

- doesn't have an instance name (or the instance name is mispelled)

- does not exist in the frame where that code is trying to talk to it

- is animated into place but is not assigned instance names in every keyframe for it

- is one of two or more consecutive keyframes of the same objects with no name assigned in the preceding frame(s).

 

If you go into your Publish Settings Flash section and select the option to Permit debugging, your error message should have a line number following the frame number which will help you isolate which object is involved.

6 replies

Participating Frequently
May 1, 2018

File download link = first sentence

Ned Murphy
Ned MurphyCorrect answer
Legend
May 1, 2018

The 1009 error indicates that one of the objects being targeted by your code is out of scope.  This could mean that the object....

 

- is declared but not instantiated

- doesn't have an instance name (or the instance name is mispelled)

- does not exist in the frame where that code is trying to talk to it

- is animated into place but is not assigned instance names in every keyframe for it

- is one of two or more consecutive keyframes of the same objects with no name assigned in the preceding frame(s).

 

If you go into your Publish Settings Flash section and select the option to Permit debugging, your error message should have a line number following the frame number which will help you isolate which object is involved.

Participating Frequently
May 1, 2018

I'm still a beginner at this and i don't exactly know when do i need to instantiate something or not, hence i've provided the link above to my file so you guys could look at my codes to better assist me, i've read your point 2,3,4, i don't think mine falls under those, I don't understand your point 5. Seems really foreign to me.