# Duplicating and Removing Movie Clips

**URL:** https://forum.kirupa.com/t/duplicating-and-removing-movie-clips/121515
**Category:** Uncategorized
**Created:** [September 3, 2004, 1:22pm UTC](https://forum.kirupa.com/t/duplicating-and-removing-movie-clips/121515 "2004-09-03T13:22:02Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Gumby19](https://avatars.discourse-cdn.com/v4/letter/g/3da27b/32.png) [@Gumby19](https://forum.kirupa.com/u/Gumby19)
#### Post date: [September 3, 2004, 1:22pm UTC](https://forum.kirupa.com/t/duplicating-and-removing-movie-clips/121515/1 "2004-09-03T13:22:02Z")

</div>

Ok, I’m pulling a Clip out of the Library and Duplicating it so many times with this code. It works fine. I would like to know what the best way to remove them all at once is, and also to be able to click a button and have the number that is duplicated on the stage change. I’ve tried a couple of ways for that but can’t quite get it to work. A little help is appreciated. Thanks.

\_global.amount = 100;  
\_root.attachMovie(“Ball”, “ball1”, 1);  
for (i=0; i\<\_global.amount; i++) {  
scale = (random(75));  
duplicateMovieClip(ball1, “ball\_clip”+i, i);  
setProperty(“ball\_clip”+i, \_x, random(500));  
setProperty(“ball\_clip”+i, \_y, random(350));  
i++;  
}
