# Remove movie clips

**URL:** https://forum.kirupa.com/t/remove-movie-clips/185733
**Category:** flash
**Created:** [April 15, 2006, 11:38pm UTC](https://forum.kirupa.com/t/remove-movie-clips/185733 "2006-04-15T23:38:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![NeoDreamer](https://avatars.discourse-cdn.com/v4/letter/n/ccd318/32.png) [@NeoDreamer](https://forum.kirupa.com/u/NeoDreamer)
#### Post date: [April 15, 2006, 11:38pm UTC](https://forum.kirupa.com/t/remove-movie-clips/185733/1 "2006-04-15T23:38:04Z")

</div>

I am using Kirupa’s random motion tutorial for creating 7 movie clips.

```auto

i = 0;
while (i <= 7) {
	hydro.duplicateMovieClip("hydro"+i, i);
	i++;
}

```

I have a variable called “alter.” If it is a positive number, it will add that number of movie clips. If it is negative, it will remove that many number of movie clips. So how do I modify the current code to do this?
