# Help with duplicateMovieClip method

**URL:** <https://forum.kirupa.com/t/help-with-duplicatemovieclip-method/160930>\
**Category:** Uncategorized\
**Created:** [August 30, 2005, 7:16pm UTC](https://forum.kirupa.com/t/help-with-duplicatemovieclip-method/160930 "2005-08-30T19:16:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wo1olf](https://avatars.discourse-cdn.com/v4/letter/w/278dde/32.png) [@wo1olf](https://forum.kirupa.com/u/wo1olf)\
**Post date:** [August 30, 2005, 7:16pm UTC](https://forum.kirupa.com/t/help-with-duplicatemovieclip-method/160930/1 "2005-08-30T19:16:04Z")

</div>

i’ve used the following code to create instance of my movieclip “fly”;

while (i\<25) {  
fly.duplicateMovieClip(“fly”+i,this.getNextHighestDepth());  
i++;  
}

now i’im trying to remove them using actionscript  
i tried with each of the code below

clearBtn.onPress=function(){  
\_root.fly.removeMovieClip();  
}

clearBtn.onPress=function(){  
\_root.fly.clear();  
}

clearBtn.onPress=function(){  
\_root.fly.\_visible=false;  
}

but it doesn’t seem work. Does anyone Know how can i do it ?  
thnks
