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

**URL:** <https://forum.kirupa.com/t/typeerror-error-1009-cannot-access-a-property-or-method-of-a-null-object-reference/315471>\
**Category:** Uncategorized\
**Created:** [October 27, 2010, 8:14am UTC](https://forum.kirupa.com/t/typeerror-error-1009-cannot-access-a-property-or-method-of-a-null-object-reference/315471 "2010-10-27T08:14:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bay6](https://avatars.discourse-cdn.com/v4/letter/b/5f8ce5/32.png) [@Bay6](https://forum.kirupa.com/u/Bay6)\
**Post date:** [October 27, 2010, 8:14am UTC](https://forum.kirupa.com/t/typeerror-error-1009-cannot-access-a-property-or-method-of-a-null-object-reference/315471/1 "2010-10-27T08:14:21Z")

</div>

Hello,

I am using this method to create a slider to control frames in a movie clip.

var bounds:Rectangle=new Rectangle(SliderControl\_MC.x,SliderControl\_MC.y,178,0);  
SliderControl\_MC.addEventListener(MouseEvent.MOUSE\_DOWN,dragScroll);  
function dragScroll(e:MouseEvent):void {  
SliderControl\_MC.startDrag(false,bounds);  
}  
stage.addEventListener(MouseEvent.MOUSE\_UP,dropScroll);  
function dropScroll(e:MouseEvent):void {  
SliderControl\_MC.stopDrag();  
}

The slider works well when I’m in the scene that contains the slider. When I go to a scene that does not include the slider, I get the following output error.

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

How can I stop the stage.add.EventListener when I navigate to other scenes that don’t include the slider.

This is my first as3 project. The project functions as it should but I don’t know if the output error will cause problems later.

Thank you for your help.
