# Won't duplicate into a box

**URL:** <https://forum.kirupa.com/t/wont-duplicate-into-a-box/20423>\
**Category:** Uncategorized\
**Created:** [May 8, 2003, 3:02pm UTC](https://forum.kirupa.com/t/wont-duplicate-into-a-box/20423 "2003-05-08T15:02:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mlk](https://avatars.discourse-cdn.com/v4/letter/m/e56c9b/32.png) [@mlk](https://forum.kirupa.com/u/mlk)\
**Post date:** [May 8, 2003, 3:02pm UTC](https://forum.kirupa.com/t/wont-duplicate-into-a-box/20423/1 "2003-05-08T15:02:24Z")

</div>

\<embed src=http://mlkdesign.online.fr/misc/kirupa/dup\_experiment.swf height=300 width=300 type=application/x-shockwave-flash\>

mhhh can anyone tell me why the round mc wont duplicate into a box, but makes an ugly pyramid with the wrong coordinates on top of that ???

here’s what’s on the duplicate button

```auto

on(release){
	for(m=1; m<=5; m++) {
	    for(i=1; i<=5; i++) {
			drag0.duplicateMovieClip(["drag"+i+"_"+m],i*m);
			setProperty (["drag"+i+"_"+m], _x, drag0._x+i*30);
     		setProperty (["drag"+i+"_"+m], _y, drag0._y+m*30);
			trace("drag"+i+"_"+m)
		}
	}
}

```

---

<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:** [May 8, 2003, 3:25pm UTC](https://forum.kirupa.com/t/wont-duplicate-into-a-box/20423/2 "2003-05-08T15:25:38Z")

</div>

yea mon, I think its the depth you’re assigning the duplicated clips isn’t necessary unique so some clips are getting overwritten

this is your line of duplication code:

```auto

drag0.duplicateMovieClip(["drag"+i+"_"+m],i*m);

```

try something more like this:

```auto

++ClipCount;
drag0.duplicateMovieClip(["drag"+i+"_"+m],ClipCount);

```

should do the job  
let me know if it works 😉

---

<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:** [May 8, 2003, 3:48pm UTC](https://forum.kirupa.com/t/wont-duplicate-into-a-box/20423/3 "2003-05-08T15:48:36Z")

</div>

that’s right, m\_andrews808. =)

and you could use the initObject, mlk. 😉

```auto
drag0.duplicateMovieClip("drag"+count++, count, {_x:drag0._x+i*30, _y:drag0._y+m*30});

```
