Hello I’m new to AS3 and looking for some help on an assignment!! Put simply on a website I am developing I can access the “teams” & “bikes” pages because they are part of the main nav. However the “yamhome” is part of a subnav off of the “teams” page. Flash output is throwing me an error I listed below. Code is below that!
Anyone have any suggestions, I’m just starting out with AS3, thanks!
error: TypeError: Error #1009: Cannot access a property or method of a null object reference.
code:
home_btn . addEventListener(MouseEvent.CLICK, homePage);
teams_btn . addEventListener(MouseEvent.CLICK, teamsPage);
bikes_btn . addEventListener(MouseEvent.CLICK, bikesPage);
yamhome_btn . addEventListener(MouseEvent.CLICK, yamHomePage);
function homePage(event:MouseEvent):void
{
gotoAndStop(“home”);
}
function teamsPage(event:MouseEvent):void
{
gotoAndStop(“teams”);
}
function bikesPage(event:MouseEvent):void
{
gotoAndStop(“bikes”);
}
function yamHomePage(event:MouseEvent):void
{
gotoAndStop(“yamhome”);
}