# Duplicating movie clips

**URL:** <https://forum.kirupa.com/t/duplicating-movie-clips/7706>\
**Category:** Uncategorized\
**Created:** [November 6, 2002, 3:02am UTC](https://forum.kirupa.com/t/duplicating-movie-clips/7706 "2002-11-06T03:02:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raydred](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/raydred/32/65_2.png) [@Raydred](https://forum.kirupa.com/u/Raydred)\
**Post date:** [November 6, 2002, 3:02am UTC](https://forum.kirupa.com/t/duplicating-movie-clips/7706/1 "2002-11-06T03:02:38Z")

</div>

ok im making a break out game…

i can dup the block mc’s and make the first row of blocks, but how do i get the 2nd row, the 3rd. etc…

ex: i want it to look like this

* * *

* * *

* * *

* * *

This is the code i have…

```php
for(i=0; i < 7; i++){
	duplicateMovieClip(block,"block" add i,i);
	xpos = Number(startx + Number(i*27));
	rColor = Number(000);
	_root["block" add i]._x = xpos;
	
}

```

here is what i have so far.

[http://www.raydred.com/arcade/breakout/dredBreakout.html](http://www.raydred.com/arcade/breakout/dredBreakout.html)

any thoughts or ideas?  
Thanks!

ps, its actionscript, i used the php codeing block cause of the pretty colors =)

---

<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:** [November 6, 2002, 6:14am UTC](https://forum.kirupa.com/t/duplicating-movie-clips/7706/2 "2002-11-06T06:14:10Z")

</div>

HI,

try to nest one more loop outside this, wich will change ypos.

---

<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:** [November 6, 2002, 4:02pm UTC](https://forum.kirupa.com/t/duplicating-movie-clips/7706/3 "2002-11-06T16:02:46Z")

</div>

Cool i’ll try that thanks! =)
