# Game Error : Trying to Remove all MovieClips

**URL:** https://forum.kirupa.com/t/game-error-trying-to-remove-all-movieclips/321908
**Category:** flash
**Created:** [May 4, 2011, 3:44pm UTC](https://forum.kirupa.com/t/game-error-trying-to-remove-all-movieclips/321908 "2011-05-04T15:44:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Irish\_Caveman](https://avatars.discourse-cdn.com/v4/letter/i/839c29/32.png) [@Irish\_Caveman](https://forum.kirupa.com/u/Irish_Caveman)
#### Post date: [May 4, 2011, 3:44pm UTC](https://forum.kirupa.com/t/game-error-trying-to-remove-all-movieclips/321908/1 "2011-05-04T15:44:57Z")

</div>

Hey guys,

So i have this flash game with couple of different scenes  
And im trying to remove all of the movieclips when the scene ends because i keep getting a loop of errors, for example this one

_TypeError: Error #1009: Cannot access a property or method of a null object reference.  
at BlobBobScenes\_fla::MainTimeline/star()_

I have tried removing these

\*else if (mcMain.hitTestObject(level1.goal))  
{  
trace(“Level 1 Completed”)  
gotoAndStop(“1”,“Scene 6”);  
removeChild(mcMain);  
removeChild(level1);

```
	stage.removeEventListener(KeyboardEvent.KEY_UP, checkKeysUp);
	
	mcMain.addEventListener(Event.ENTER_FRAME, star);  
}*

```

“level1” is the movieclip that contains everything except for the character.

Any ideas on how to remove everything from the stage when the character hits the goal ??

Thanks
