Remove movie clips

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


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?