Skip navigation
Currently Being Moderated

Error eerrrrr!

Jun 16, 2010 11:31 AM

1009 null object reference. I've been trying to figure this out without a posting here, sifting through all the null object post, but... here it is.

 

I've placed a button (bella_btn), with an instance name of bella_btn, on the main timeline, in frame 5. I want to click on it and goto frame 8. Movie plays fine, until frame 5, where the bella_btn is, I get the null object reference error.

 

 

The Error

 

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at WebSite2PortTesting_fla::MainTimeline/frame5()
at flash.display::MovieClip/gotoAndStop()
at WebSite2PortTesting_fla::MainTimeline/clickPortfolio()

 

 

This is the only code on frame 5

 

bella_btn.addEventListener(MouseEvent.CLICK, clickBella);

function clickBella(e:Event)

 

{
        gotoAndStop(8);

}

 

What do I do?! And, if you have time could you explain this error.

 
Replies
  • Currently Being Moderated
    Jun 16, 2010 11:40 AM   in reply to chrcha26

    It looks like the button is not on the timeline at the same frame the code is placed on the timeline.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 16, 2010 12:02 PM   in reply to chrcha26

    The only other thing I can suggest is to verify the instance name of the button. The code worked just fine for me, but I had both on frame 1.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 17, 2010 4:42 AM   in reply to chrcha26

    Are able to post your file?

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points