# Removing MC's created with Actionscript

**URL:** https://forum.kirupa.com/t/removing-mcs-created-with-actionscript/230945
**Category:** flash
**Created:** [June 30, 2007, 11:45am UTC](https://forum.kirupa.com/t/removing-mcs-created-with-actionscript/230945 "2007-06-30T11:45:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dezamp](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@dezamp](https://forum.kirupa.com/u/dezamp)
#### Post date: [June 30, 2007, 11:45am UTC](https://forum.kirupa.com/t/removing-mcs-created-with-actionscript/230945/1 "2007-06-30T11:45:12Z")

</div>

I have created a moviclip with the following code:

```auto
_root.createEmptyMovieClip(i,_root.getNextHighestDepth());

```

using

```auto
_root*

```

to access the movieclip(s).

Then after pressing a button I want to delete the movieclips. I have tried:

```auto
_root[q].removeMovieClip() 
and 
removeMovieClip(_root[q])

```

but neither actually work. The only way I have found is by doing \_root[1] etc but that takes too long and it wouldn’t really work because the number of movieclips created is unlimited.

Please HELP!
