# Remove movie clips

**URL:** <https://forum.kirupa.com/t/remove-movie-clips/263784>\
**Category:** Uncategorized\
**Created:** [June 19, 2008, 7:36am UTC](https://forum.kirupa.com/t/remove-movie-clips/263784 "2008-06-19T07:36:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaoss](https://avatars.discourse-cdn.com/v4/letter/k/ac8455/32.png) [@kaoss](https://forum.kirupa.com/u/kaoss)\
**Post date:** [June 19, 2008, 7:36am UTC](https://forum.kirupa.com/t/remove-movie-clips/263784/1 "2008-06-19T07:36:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)\
**Post date:** [June 19, 2008, 8:43am UTC](https://forum.kirupa.com/t/remove-movie-clips/263784/2 "2008-06-19T08:43:04Z")

</div>

removeMovieClip()

_shurgs_  
use the counter so after every five it fires…

---

<div class="post-metadata">

**Author:** ![kaoss](https://avatars.discourse-cdn.com/v4/letter/k/ac8455/32.png) [@kaoss](https://forum.kirupa.com/u/kaoss)\
**Post date:** [June 19, 2008, 12:15pm UTC](https://forum.kirupa.com/t/remove-movie-clips/263784/3 "2008-06-19T12:15:18Z")

</div>

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
