# Multiple buttons problem

**URL:** https://forum.kirupa.com/t/multiple-buttons-problem/275668
**Category:** Uncategorized
**Created:** [November 17, 2008, 12:38pm UTC](https://forum.kirupa.com/t/multiple-buttons-problem/275668 "2008-11-17T12:38:56Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rzakyn](https://avatars.discourse-cdn.com/v4/letter/r/2acd7d/32.png) [@rzakyn](https://forum.kirupa.com/u/rzakyn)
#### Post date: [November 17, 2008, 12:38pm UTC](https://forum.kirupa.com/t/multiple-buttons-problem/275668/1 "2008-11-17T12:38:56Z")

</div>

solved : i wrote all the codes in thier own layers, and it’s solved.

i’m making a website. i’m making with as 3.0 this time. but, my buttons aren’t working. first 2 buttons work. but other ones not. what can be the problem? my script is :

stop();  
home\_btn.addEventListener(MouseEvent.MOUSE\_DOWN, mouseDownHandler1);  
function mouseDownHandler1(event:MouseEvent):void {  
gotoAndStop(2);  
}

gallery\_btn.addEventListener(MouseEvent.MOUSE\_DOWN, mouseDownHandler2);  
function mouseDownHandler2(event:MouseEvent):void {  
gotoAndStop(3);  
}

art\_btn.addEventListener(MouseEvent.MOUSE\_DOWN, mouseDownHandler3);  
function mouseDownHandler3(event:MouseEvent):void {  
gotoAndStop(4);  
}

sanat1\_btn.addEventListener(MouseEvent.MOUSE\_DOWN, mouseDownHandler4);  
function mouseDownHandler4(event:MouseEvent):void {  
gotoAndStop(8);  
}

update : this works, when do a clean flash file. if you would like to see my fla, i can send.

it says : “TypeError: Error #1009: Cannot access a property or method of a null object reference.  
at rzakyn\_fla::MainTimeline/frame2()”
