# Duplicate

**URL:** <https://forum.kirupa.com/t/duplicate/152401>\
**Category:** flash\
**Created:** [June 24, 2005, 3:25pm UTC](https://forum.kirupa.com/t/duplicate/152401 "2005-06-24T15:25:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![saad](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@saad](https://forum.kirupa.com/u/saad)\
**Post date:** [June 24, 2005, 3:25pm UTC](https://forum.kirupa.com/t/duplicate/152401/1 "2005-06-24T15:25:05Z")

</div>

I am trying to duplicate a movie for a bullet hole when the user clicks a button hole is sapposed to appear but its not working. here is the code I have inside my bullet hole

onClipEvent(load){  
i = 0  
}  
onClipEvent (mouseDown) {  
i++;  
duplicateMovieClip(\_root.bullethole, “bullethole”+i, i);  
\_root[“bullethole”+i].\_x = \_root.crosshair1.\_x;  
\_root[“bullethole”+i].\_y = \_root.crosshair1.\_y;  
trace(i)  
}

It duplicates but also removes previous bullet holes. This is what trace out puts

1  
undefined  
2  
1  
3  
1  
undefined  
4  
1  
1  
2  
5  
1  
1  
2  
undefined  
6  
1  
1  
1  
2  
3  
7  
1  
1  
1  
2  
3  
undefined  
8  
1  
1  
1  
1  
2  
3  
4  
9

and so on

Any help?
