# Cant duplicate two movies in a for statement?

**URL:** <https://forum.kirupa.com/t/cant-duplicate-two-movies-in-a-for-statement/94516>\
**Category:** Uncategorized\
**Created:** [November 13, 2003, 1:22pm UTC](https://forum.kirupa.com/t/cant-duplicate-two-movies-in-a-for-statement/94516 "2003-11-13T13:22:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yakob](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/yakob/32/348_2.png) [@yakob](https://forum.kirupa.com/u/yakob)\
**Post date:** [November 13, 2003, 1:22pm UTC](https://forum.kirupa.com/t/cant-duplicate-two-movies-in-a-for-statement/94516/1 "2003-11-13T13:22:27Z")

</div>

hi out there,

been following a great tutorial for grid creation at:

[http://www.kirupa.com/developer/actionscript/grid.htm](http://www.kirupa.com/developer/actionscript/grid.htm)

i’m trying to adapt this to work with two moviclips (a horizontal line and a verticle) to great a grid that ‘fades’ in. to do this, i’ve basically taken the original and added a 2nd MC referance:

gridx=30;  
gridy=30;  
num=0;  
for (var i=0;i \< 10;i++)  
{  
for (var j=0;j \< 10;j++)  
{  
vert.duplicateMovieClip(“vert”+num,num);  
vertMc=this[“vert”+num];  
vertMc.\_x=gridx_i;  
hori.duplicateMovieClip(“hori”+num,num);  
horiMc=this[“hori”+num];  
horiMc.\_y=gridy_j;  
num++;  
}  
}  
vert.\_visible=0;  
hori.\_visible=0;

but no jpy! i get ‘some’ of the horizontal lines but no verticals at all.

in addition to this i need to make the grid 210 x 510. the moment i increase the \< 10 above 20, the whole script grinds to a halt and brings the flash player to it’s knees!

i’ve posted the fla here:

[http://www.28design.co.uk/jake/flash/duplicate\_grid\_v2.fla](http://www.28design.co.uk/jake/flash/duplicate_grid_v2.fla)

if anyone can help, it would be grand!

many thanks,

jake
