# Remove Movie Clips

**URL:** <https://forum.kirupa.com/t/remove-movie-clips/264520>\
**Category:** flash\
**Created:** [June 26, 2008, 7:59pm UTC](https://forum.kirupa.com/t/remove-movie-clips/264520 "2008-06-26T19:59:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![felipegm](https://avatars.discourse-cdn.com/v4/letter/f/e9bcb4/32.png) [@felipegm](https://forum.kirupa.com/u/felipegm)\
**Post date:** [June 26, 2008, 7:59pm UTC](https://forum.kirupa.com/t/remove-movie-clips/264520/1 "2008-06-26T19:59:34Z")

</div>

Hi

How do I remove ALL movieclips on the stage?

the´ve been created thru DuplicateMovieClip action.

thanks

---

<div class="post-metadata">

**Author:** ![pantas](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@pantas](https://forum.kirupa.com/u/pantas)\
**Post date:** [June 27, 2008, 11:38am UTC](https://forum.kirupa.com/t/remove-movie-clips/264520/2 "2008-06-27T11:38:39Z")

</div>

hmm…if you duplicate them inside one empty movieclip, you will only need to remove that movieclip…

or you can use a for cicle… dunno

---

<div class="post-metadata">

**Author:** ![felipegm](https://avatars.discourse-cdn.com/v4/letter/f/e9bcb4/32.png) [@felipegm](https://forum.kirupa.com/u/felipegm)\
**Post date:** [June 27, 2008, 1:14pm UTC](https://forum.kirupa.com/t/remove-movie-clips/264520/3 "2008-06-27T13:14:39Z")

</div>

Was not inside a movieclip. Was on the stage. i thought about creating them inside a mc, but it´s not possible in that case.

---

<div class="post-metadata">

**Author:** ![pantas](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@pantas](https://forum.kirupa.com/u/pantas)\
**Post date:** [June 27, 2008, 3:39pm UTC](https://forum.kirupa.com/t/remove-movie-clips/264520/4 "2008-06-27T15:39:57Z")

</div>

for cicle?

---

<div class="post-metadata">

**Author:** ![felipegm](https://avatars.discourse-cdn.com/v4/letter/f/e9bcb4/32.png) [@felipegm](https://forum.kirupa.com/u/felipegm)\
**Post date:** [June 27, 2008, 11:15pm UTC](https://forum.kirupa.com/t/remove-movie-clips/264520/5 "2008-06-27T23:15:30Z")

</div>

[QUOTE=pantas;2350231]for cicle?[/QUOTE]

didnt get it ☹

---

<div class="post-metadata">

**Author:** ![name1](https://avatars.discourse-cdn.com/v4/letter/n/ed655f/32.png) [@name1](https://forum.kirupa.com/u/name1)\
**Post date:** [June 27, 2008, 11:45pm UTC](https://forum.kirupa.com/t/remove-movie-clips/264520/6 "2008-06-27T23:45:11Z")

</div>

hey felipegm,

as you create the clips using duplicateMovieClip( ), push them into an array using the .push method. then when you want to remove the clips simply loop through the array and do so. lastly, splice the array at the 0 position to delete the references in memory that correspond the removed clips. code is below.

// create an array  
var yourArray:Array = [];

// duplicate your clip  
yourClip.duplicateMovieClip(“newClipName”, \_root.getNextHighestDepth());

// push the new clip to the end of the array  
yourArray.push(newClipName);

// delete the clips on stage  
for(var i:Number = 0; i \< yourArray.length; i++)  
{

```
yourArray*.removeMovieClip( );

```

};

// now remove the old data from the array  
yourArray.splice(0);
