# Creating grid problem

**URL:** <https://forum.kirupa.com/t/creating-grid-problem/180496>\
**Category:** Uncategorized\
**Created:** [March 1, 2006, 1:56am UTC](https://forum.kirupa.com/t/creating-grid-problem/180496 "2006-03-01T01:56:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dec27](https://avatars.discourse-cdn.com/v4/letter/d/2bfe46/32.png) [@dec27](https://forum.kirupa.com/u/dec27)\
**Post date:** [March 1, 2006, 1:56am UTC](https://forum.kirupa.com/t/creating-grid-problem/180496/1 "2006-03-01T01:56:03Z")

</div>

Hi everybody!

I just want to create a grid, but I don’t know which is the problem. this is the script:

MovieClip.prototype.drawRect = function(w, h) {  
this.beginFill(0x006699, 100);  
this.moveTo(0, 0);  
this.lineTo(0+w, 0);  
this.lineTo(0+w, 0+h);  
this.lineTo(0, 0+h);  
this.lineTo(0, 0);  
this.endFill();  
};  
gridx = 30;  
gridy = 30;  
depth = 0;  
for (i=0; i\<10; i++) {  
for (j=0; j\<10; j++) {  
var mc = this.createEmptyMovieClip(“mcc”+depth, depth);  
}  
mc.lineStyle(0.25, 0x66CCFF, 100);  
mc.drawRect(10, 10);  
mc.\_x = i_gridx;  
mc.\_y = j_gridy;  
depth++;  
}

Hope somebody can help me… please!

Thanks in advanced! :te:
