Skip to main content
Inspiring
December 30, 2012
Answered

Can not figure out an error message

  • December 30, 2012
  • 1 reply
  • 6589 views

I made a test file where all elements seem to work. However when I apply the same set up in my real world complex file with other elements, something throws off the code. Here is the error message I have in the output panel. How do I go around testing what causes the problem?

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

    at acolyte51b_AppsPopUpsThumbs_fla::mainsite_mc_2/frame72()[acolyte51b_AppsPopUpsThumbs_fla.mainsite_mc_2::frame72:206]

    at flash.display::MovieClip/gotoAndPlay()

    at acolyte51b_AppsPopUpsThumbs_fla::mainsite_mc_2/gotoFrame2()[acolyte51b_AppsPopUpsThumbs_fla.mainsite_mc_2::frame82:350]

line 72:206 refers to this:

holderMovieClip.holderMovieClip_Bckgrnd.visible = false;

(which works in the test version)

and line 82:350 refers to this:

gotoAndPlay("prdctsPopUps");

(this code works, and brings a user to "prdctsPopUps" section, which is frame 72. I guess in is listed in the output panel because this code activates the error, which appears when a user goes to frame 72)

This topic has been closed for replies.
Correct answer kglad

No, I removed all the frames (even thogh they were empty) after frame 72 on the layer which contains holderMovieClip. This way frame 73 starts empty (no frames) on the layer which contains holderMovieClip.


you need a frame 73 in holderMovieClip's layer otherwise, holderMovieClip doesn't exist on frame 73 (when your pageB code executes).

1 reply

kglad
Community Expert
Community Expert
December 30, 2012

holderMovieClip.holderMovieClip_Bckgrnd doesn't exist when line 206 executes.

use the trace function to debug.

nikolaigAuthor
Inspiring
December 30, 2012

It does exist. I manually checked for it on the screen and see that it is there and named properly.

Maybe some code reneders it to null?

What trace function would I use to debug and on what action do I apply it to?

Ned Murphy
Legend
December 30, 2012

Does the object animate into place in the frames prior to frame 72?  If so, be sure to assign the instance name at the beginning.