# I'm freaking out! :-( error #1009 i searched everywhere!

**URL:** <https://forum.kirupa.com/t/im-freaking-out-error-1009-i-searched-everywhere/310962>\
**Category:** Uncategorized\
**Created:** [June 24, 2010, 12:41am UTC](https://forum.kirupa.com/t/im-freaking-out-error-1009-i-searched-everywhere/310962 "2010-06-24T00:41:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![apricota](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@apricota](https://forum.kirupa.com/u/apricota)\
**Post date:** [June 24, 2010, 12:41am UTC](https://forum.kirupa.com/t/im-freaking-out-error-1009-i-searched-everywhere/310962/1 "2010-06-24T00:41:22Z")

</div>

TypeError: Error #1009: Cannot access a property or method of a null object reference. at Hospitalroom\_fla::MainTimeline/frame1()

i need to assign AS code to a button (“my\_btn”). that button is inside 3 other mc’s:

here is it path-

root.mc1.mc2.mc3.my\_btn.

i understand i get this error because my\_btn is not initialize when i press ctrl+ENTER.

how can i make it initialize anyway?  
please please help… i tried everything…

\*\*what can i do? that button must be in that path…  
\*\*  
the FLA is Attached

and the AS code is:

stop();

buttonMode=true;

mc1.mc2.mc3.my\_btn.addEventListener(MouseEvent.CLICK, traceclicked);

function traceclicked(evt:MouseEvent):void {  
trace(“my\_btn has clicked”);

}

\*\*please please try to help me, i have no idea what shell i do…  
\*\*

thank you very much!
