# Duplicating movieclips

**URL:** https://forum.kirupa.com/t/duplicating-movieclips/54946
**Category:** Uncategorized
**Created:** [June 19, 2004, 3:48am UTC](https://forum.kirupa.com/t/duplicating-movieclips/54946 "2004-06-19T03:48:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Towlie](https://avatars.discourse-cdn.com/v4/letter/t/a88e4f/32.png) [@Towlie](https://forum.kirupa.com/u/Towlie)
#### Post date: [June 19, 2004, 3:48am UTC](https://forum.kirupa.com/t/duplicating-movieclips/54946/1 "2004-06-19T03:48:11Z")

</div>

My game isn’t working. My gun can move in 8 directions. like up donw lkeft right diagnols. And i want when he hits shift to fire a bullet i drew. It doesnt shoot.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 17, 2004, 3:25am UTC](https://forum.kirupa.com/t/duplicating-movieclips/54946/2 "2004-07-17T03:25:55Z")

</div>

Here it is:

```php
 
numMovie = 2;
//that says how many of the same movieClips will apear on screen//
for (i=2; i<=numMovie; i++) {
	Movie.duplicateMovieClip("Movie1"+i, i+100);
             //the "movie"+i is the name of the duplicated movieClip//
	_root["Movie1"+i]._x = 309.1;
	_root["Movie1"+i]._y = 181.5;
             //these are to set the duplicated movieClip somewhere so that it doesn't end up right under the first movieClip :P//
}

```

if you have any more questions, feel free to ask :D.
