# Need AS3 help linking 2nd & 3rd teir buttons

**URL:** <https://forum.kirupa.com/t/need-as3-help-linking-2nd-3rd-teir-buttons/310030>\
**Category:** Uncategorized\
**Created:** [May 30, 2010, 9:18pm UTC](https://forum.kirupa.com/t/need-as3-help-linking-2nd-3rd-teir-buttons/310030 "2010-05-30T21:18:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vector\_chaos](https://avatars.discourse-cdn.com/v4/letter/v/c6cbf5/32.png) [@vector\_chaos](https://forum.kirupa.com/u/vector_chaos)\
**Post date:** [May 30, 2010, 9:18pm UTC](https://forum.kirupa.com/t/need-as3-help-linking-2nd-3rd-teir-buttons/310030/1 "2010-05-30T21:18:06Z")

</div>

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”);  
}
