# TypeError: Error #1009 Help please

**URL:** <https://forum.kirupa.com/t/typeerror-error-1009-help-please/319429>\
**Category:** flash\
**Created:** [February 20, 2011, 1:31pm UTC](https://forum.kirupa.com/t/typeerror-error-1009-help-please/319429 "2011-02-20T13:31:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zinc9](https://avatars.discourse-cdn.com/v4/letter/z/54ee81/32.png) [@zinc9](https://forum.kirupa.com/u/zinc9)\
**Post date:** [February 20, 2011, 1:31pm UTC](https://forum.kirupa.com/t/typeerror-error-1009-help-please/319429/1 "2011-02-20T13:31:34Z")

</div>

Hi

I’ll start with the basics. I have a 5 page site made so far. On one of the pages I have a subpage and on this subpage is a video. The code I am trying to write is to stop this video playing whenever any of the other page links are clicked on the top. Im using flash by the way. Don;t know how to put a prefix in the thread title sorry

The code I am using is:

```auto
home.addEventListener(MouseEvent.CLICK, stopVideoSound);

function stopVideoSound(event:MouseEvent):void {
    videoClip.volume = 0
}

```

videoClip is the instance name I have given my video and home is just one of the page links. I haven’t written the others in yet. When I preview this though I keep getting this error:

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

‘assignmentinwork\_fla’ is the file name but I can’t seem to work out what the rest means or how I would fix this so the video stops when teh subpage is clicked out of.

Thanks for any advice. I’m really at a dead end here.  
Much appreciated if you need any more info with what I’m working with then feel free to ask.
