# Error #1009, How to do function not null?

**URL:** <https://forum.kirupa.com/t/error-1009-how-to-do-function-not-null/322983>\
**Category:** flash\
**Created:** [June 11, 2011, 7:53pm UTC](https://forum.kirupa.com/t/error-1009-how-to-do-function-not-null/322983 "2011-06-11T19:53:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nutonas](https://avatars.discourse-cdn.com/v4/letter/n/4bbf92/32.png) [@nutonas](https://forum.kirupa.com/u/nutonas)\
**Post date:** [June 11, 2011, 7:53pm UTC](https://forum.kirupa.com/t/error-1009-how-to-do-function-not-null/322983/1 "2011-06-11T19:53:09Z")

</div>

Hi, so i have some problem i wrote a code with functions but when i testing movie i got some error like “TypeError: Error #1009: Cannot access a property or method of a null object reference.”.  
Who can help me to solve this problem?  
There is code:

> import flash.events.MouseEvent;

stop();  
function kontaktaiOver(event:MouseEvent):void {  
event.target.gotoAndPlay(“kont\_iejimas”);  
}  
function kontaktaiOut(event:MouseEvent):void {  
event.target.gotoAndPlay(“kont\_isejimas”);  
}

kontaktaiButt.addEventListener(MouseEvent.ROLL\_OVER, kontaktaiOver);  
kontaktaiButt.addEventListener(MouseEvent.ROLL\_OUT, kontaktaiOut);
