# Clear a Movie,HELP!

**URL:** <https://forum.kirupa.com/t/clear-a-movie-help/17592>\
**Category:** Uncategorized\
**Created:** [April 7, 2003, 10:57am UTC](https://forum.kirupa.com/t/clear-a-movie-help/17592 "2003-04-07T10:57:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Niall](https://avatars.discourse-cdn.com/v4/letter/n/73ab20/32.png) [@Niall](https://forum.kirupa.com/u/Niall)\
**Post date:** [April 7, 2003, 10:57am UTC](https://forum.kirupa.com/t/clear-a-movie-help/17592/1 "2003-04-07T10:57:41Z")

</div>

im creating instances of a movie when i hit a button on screen. I want to hit another button to be able to clear these instances all at once. Does anyone know how to do this.

Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 7, 2003, 3:24pm UTC](https://forum.kirupa.com/t/clear-a-movie-help/17592/2 "2003-04-07T15:24:18Z")

</div>

Hi,

When you say you’re creating instances of a movie, do you mean  
you’re duplicating it?

SHO

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 7, 2003, 3:25pm UTC](https://forum.kirupa.com/t/clear-a-movie-help/17592/3 "2003-04-07T15:25:30Z")

</div>

Yes im duplicating them

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 7, 2003, 3:27pm UTC](https://forum.kirupa.com/t/clear-a-movie-help/17592/4 "2003-04-07T15:27:30Z")

</div>

You can use a for loop to cycle through the names and remove them from the stage.

But I don’t know what code you are using to duplicate the clip (other than duplicateMovieClip()), so I can’t help you much unless you share the code or sample file :-\

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 7, 2003, 3:49pm UTC](https://forum.kirupa.com/t/clear-a-movie-help/17592/5 "2003-04-07T15:49:47Z")

</div>

Hi,

If when duplicating you name them as "movieClip1, movieClip2, movieClip3, etc…  
you can (as lost in beta says) use a for loop to delete them:

```php

for(var i=0; i<numberOfClips; i++){
var clipsToDelete = eval("movieClip"+i);
 clipsToDelete.removeMovieClip();
}

```

If I was you I would store the duplications in an array so you can access them at any time and do whatever you want to all or of any of them.

Hope it helps

Cheers
