Remove movie clips

lo all… can anybody help with this.
its a friend of mine, he has a webcam, he wants to laod images in flash then remove a particular image, code so far:

counter = 2;

function update() {
newmovie = “JPG”+counter++;
duplicateMovieClip(“JPG”, newmovie, counter);
loadMovie(camurl, newmovie, “GET”);
// NEED CODE HERE TO DELETE MOVIE CLIPS AFTER 5 MORE HAVE BEEN CREATED
}

as you can see he wants to remove mc’s after 5 have been created. any ideas?

thnx in advance.

kev.

removeMovieClip()

shurgs
use the counter so after every five it fires…

the problem i am having is deleting the image continuously after 5 images are in memory.
i cant seem to locate the initial images to delete them.

i tried this, but the images are just being added to the movie.

counter=5
counter2=1

function update() {
newmovie = “JPG”+counter++;
newmovie2 = “JPG”+counter2++;
duplicateMovieClip(“JPG”, newmovie, counter);
loadMovie(camurl, newmovie, “GET”);
removeMovieClip(newmovie2)
}

is there a better way to name the movie clips maybe?

Thanks