# How to place a movieClip on a grid

**URL:** <https://forum.kirupa.com/t/how-to-place-a-movieclip-on-a-grid/304971>\
**Category:** flash\
**Created:** [February 17, 2010, 12:48pm UTC](https://forum.kirupa.com/t/how-to-place-a-movieclip-on-a-grid/304971 "2010-02-17T12:48:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fs\_tigre](https://avatars.discourse-cdn.com/v4/letter/f/edb3f5/32.png) [@fs\_tigre](https://forum.kirupa.com/u/fs_tigre)\
**Post date:** [February 17, 2010, 12:48pm UTC](https://forum.kirupa.com/t/how-to-place-a-movieclip-on-a-grid/304971/1 "2010-02-17T12:48:46Z")

</div>

Hi,

I’m trying to place a movieClip on a grid. What I have is a rectangular movieClip called recMc and I would like to create columns and rows based on two numbers that are dynamically generated, for instance if those numbers are 5 and 6, (5 rows and 6 columns) I will end up with 30 movieClips on the stage forming a rectangular shape. Oh, I would like to have some space in between each movieClip.

I think I saw something like this posted on [www.learningactionscript3.com](http://www.learningactionscript3.com/) when I bought the book, but since this site is down most of the time I cannot view it.

Can someone be so kind and show me how to do this?

```auto
var rows:Number = dynamicNum1;

var cols:Number = dynamicNum2;

for(var i=0; i<rows; i++){

}

```

Thanks a lot!
