Skip to main content
May 22, 2008
Question

TypeError?

  • May 22, 2008
  • 1 reply
  • 265 views
I have a movie-clip with a roll-over,roll-out and on-click function; a pretty simple button. When I test my movie the button works just fine and when it is clicked the movie continues. However, when I click the button an error messages also appears. Below is the error I receive and the code applied to my movie-clip. Any thoughts on this error message?

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at career_flash_fla::MainTimeline/rollOutFunc()

********************************************************************************************

stop();

start_btn.buttonMode = true;

start_btn.addEventListener(MouseEvent.ROLL_OVER, rollOverFunc);
start_btn.addEventListener(MouseEvent.ROLL_OUT, rollOutFunc);
start_btn.addEventListener(MouseEvent.CLICK, clickFunc);

function rollOverFunc(event:MouseEvent):void
{
start_btn.gotoAndPlay(2);
}

function rollOutFunc(event:MouseEvent):void
{
start_btn.gotoAndPlay(7);
}

function clickFunc(event:MouseEvent):void
{
play();
}
This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
May 22, 2008
when your main timeline advances, there's not start_btn