# Duplicate to different places

**URL:** https://forum.kirupa.com/t/duplicate-to-different-places/152375
**Category:** Uncategorized
**Created:** [June 24, 2005, 11:06am UTC](https://forum.kirupa.com/t/duplicate-to-different-places/152375 "2005-06-24T11:06:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![vintage](https://avatars.discourse-cdn.com/v4/letter/v/e68b1a/32.png) [@vintage](https://forum.kirupa.com/u/vintage)
#### Post date: [June 24, 2005, 11:06am UTC](https://forum.kirupa.com/t/duplicate-to-different-places/152375/1 "2005-06-24T11:06:43Z")

</div>

I have his piece of code.

```auto
 x = random(400);
y = random(400);
var i:Number = 0;
while (i++<5) {
    m.duplicateMovieClip("m", this.getNextHighestDepth(), {_x:x, _y:y})+1;
}

```

I know its duplicating 5 times (tested it with alpha), but the random positioning isnt working.  
It places them all on the same position, but I want them all to be on different places.  
Anyone a hint for me ?  
thx !
