Skip to main content
Participant
April 15, 2014
Answered

I am new to Flash & AS; what do I do when this shows up in my Output?

  • April 15, 2014
  • 1 reply
  • 293 views

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

    at lesson02_addlaststep_start_fla::MainTimeline/frame50()

    at flash.display::MovieClip/gotoAndStop()

    at lesson02_addlaststep_start_fla::MainTimeline/goHome()

Message was edited by: turqqueen I have a button that takes the user to the home page when they click on it from the intro but once they click on a button that takes them to another frame, and they click on the home button again, it doesn't take them anywhere.  I get no compiler errors, just this message in Output.  Thanks for any feedback.

This topic has been closed for replies.
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....

 

- 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.

1 reply

Ned Murphy
Ned MurphyCorrect answer
Legend
April 15, 2014

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

 

- 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.

turqqueenAuthor
Participant
April 15, 2014

Thank you, Ned.  I did indeed not have the object in the frame where I wanted my code to talk to it!  And thanks for the info on the Publish Settings -- I have not used that before.  Much appreciated!  Donna @ turqqueen

Ned Murphy
Legend
April 15, 2014

You're welcome Donna.