# Remove a movieclip that has audio

**URL:** <https://forum.kirupa.com/t/remove-a-movieclip-that-has-audio/266844>\
**Category:** flash\
**Created:** [July 24, 2008, 9:02pm UTC](https://forum.kirupa.com/t/remove-a-movieclip-that-has-audio/266844 "2008-07-24T21:02:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tpann](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tpann](https://forum.kirupa.com/u/tpann)\
**Post date:** [July 24, 2008, 9:02pm UTC](https://forum.kirupa.com/t/remove-a-movieclip-that-has-audio/266844/1 "2008-07-24T21:02:02Z")

</div>

I’m trying to use removeChild() to get rid of a movie clip, thus:

```php

addEventListener(Event.ENTER_FRAME, endSlide003);
function endSlide003(event:Event):void {
 if (s003.s003Finished == true) {
  if (s003Added) {
   if (s003) {
    if (s003.parent != null) {
     removeChild(s003);
     s003Added = false;
    }
   }
  }
 }
}

```

but I’m getting…

```auto

TypeError: Error #1009: Cannot access a property or method of a null object reference.
 at S003/s003Listener()

```

I don’t understand what this error refers to. The movie clip is playing audio – s003Listener is a function that calls other functions that start the audio – and I wonder if that’s the problem. Do I need to somehow close my audio or delete it or something?
