# Duplicating MovieClip In AS3 - I need help please

**URL:** <https://forum.kirupa.com/t/duplicating-movieclip-in-as3-i-need-help-please/324437>\
**Category:** flash\
**Created:** [August 21, 2011, 4:26am UTC](https://forum.kirupa.com/t/duplicating-movieclip-in-as3-i-need-help-please/324437 "2011-08-21T04:26:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Taloton](https://avatars.discourse-cdn.com/v4/letter/t/9d8465/32.png) [@Taloton](https://forum.kirupa.com/u/Taloton)\
**Post date:** [August 21, 2011, 4:26am UTC](https://forum.kirupa.com/t/duplicating-movieclip-in-as3-i-need-help-please/324437/1 "2011-08-21T04:26:09Z")

</div>

I have looked all over for a solution to the problem of duplicating movie clips in AS3 for almost a week now but I haven’t been satisfied yet.

My goal is to create multiple instances of a MovieClip with each instance name in an array/vector so I can create as many as I want in a loop. I want them to be able to execute functions that will be programmed into the MovieClip parent.

I have no idea which method is good to use and I have found multiple ways of duplicating movie clips but whatever I try doesn’t work.

I am trying to create infinite bullets that come out of a gun in the direction of the mouse.

The instance name of the bullet is “bullet” and the instance name of the gun is “gun”.

I have:

```auto

addEventListener (MouseEvent.MOUSE_DOWN,clk);

function clk
{[INDENT]**//duplicate bullet here to have the instance name of bullett[1]
???**

while (alv[1] = 1)//a while loop that will control the bullet (not important)
{
[/INDENT]
[INDENT=2]
[/INDENT]
[INDENT]}
[/INDENT]
 }

```
