# Error #1009:Cannot access a property or method of a null object reference

**URL:** <https://forum.kirupa.com/t/error-1009-cannot-access-a-property-or-method-of-a-null-object-reference/282450>\
**Category:** Uncategorized\
**Created:** [February 22, 2009, 10:54am UTC](https://forum.kirupa.com/t/error-1009-cannot-access-a-property-or-method-of-a-null-object-reference/282450 "2009-02-22T10:54:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigN](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@bigN](https://forum.kirupa.com/u/bigN)\
**Post date:** [February 22, 2009, 10:54am UTC](https://forum.kirupa.com/t/error-1009-cannot-access-a-property-or-method-of-a-null-object-reference/282450/1 "2009-02-22T10:54:56Z")

</div>

Hi,  
I am new to AS3…and already fasinated by it:)… I have a question though…  
I am creating simple website using Flashdevelop and FLASH CS3… I always want to have a separate file (eg Main.as) which will have all my code…  
Now my question is :  
I have several frames whrere at 1 frame I have an intro … and 2,3,4,5, my content …  
my buttons are being created at 2,3,4,5 frame but not at 1 … when I try to initiate a :

english\_btn.addEventListener(Event.ADDED\_TO\_STAGE, goEnglish);  
function goEnglish(e:MouseEvent):void  
{  
gotoAndStop(“Home\_en”);  
}  
I always got the above error…  
When I put the code at frame 2 then everything works fine… also when I delete the 1 frame (intro) and my buttons are initiated at 1 frame everything works again fine…  
it must be very simple but I cant find how to solve it…:sen:
