Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

New Here ,
Apr 14, 2014 Apr 14, 2014

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.

TOPICS
ActionScript
272
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 14, 2014 Apr 14, 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 Sett

...
Translate
LEGEND ,
Apr 14, 2014 Apr 14, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 14, 2014 Apr 14, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 14, 2014 Apr 14, 2014
LATEST

You're welcome Donna.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines