# Building a grid of movie clips

**URL:** https://forum.kirupa.com/t/building-a-grid-of-movie-clips/84123
**Category:** flash
**Created:** [March 24, 2005, 7:33pm UTC](https://forum.kirupa.com/t/building-a-grid-of-movie-clips/84123 "2005-03-24T19:33:29Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dzisaacs](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@dzisaacs](https://forum.kirupa.com/u/dzisaacs)
#### Post date: [March 24, 2005, 7:33pm UTC](https://forum.kirupa.com/t/building-a-grid-of-movie-clips/84123/1 "2005-03-24T19:33:29Z")

</div>

I have this code that will do one row of movie clips

I need to have a 5x5 grid of movie clips  
when i try to add an outer loop it won’t work for me ☹

so i was wondering if someone can tell me how can i have a 5x5  
grid insted of a 1x5

```auto

var clipArray = new Array();
var posArray = new Array();

for (var d = 0; d<5; d++) 
{
	myclip = attachMovie("mc", "mc"+d, d);
	myclip._y = 100;
	myclip._x = 170+myclip._width*d;

	clipArray.push(myclip);

	posArray.push(myclip._x);
	myclip.onPress = dostuff;
}

```
