# Problems with grid

**URL:** <https://forum.kirupa.com/t/problems-with-grid/271431>\
**Category:** Uncategorized\
**Created:** [September 23, 2008, 3:42am UTC](https://forum.kirupa.com/t/problems-with-grid/271431 "2008-09-23T03:42:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pixeldude](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@pixeldude](https://forum.kirupa.com/u/pixeldude)\
**Post date:** [September 23, 2008, 3:42am UTC](https://forum.kirupa.com/t/problems-with-grid/271431/1 "2008-09-23T03:42:46Z")

</div>

Aii there…

Okay I just make a grid based on array… my problem is how to highlight boxes that contain only character I mean if the box contain character it will gotoAndPlay(2)…eg:

* * *

**C**  
_CAR_  
**T**

* * *

here’s the code currently Im using…

```auto

var xPos:Number = 10;
var yPos:Number = 10;
var columns:Array = new Array(["*","*","*","*","*"],["*","*","c","*","*"],["*","c","a","r","*"],["*","*","t","*","*"],["*","*","*","*","*"]);
for (var i:Number = 0; i < columns.length; i++) {
    for (var j:Number = 0; j < columns*.length; j++) {
        //if (columns*[j]) {
            var s:MovieClip = this.attachMovie("square", "square" + this.getNextHighestDepth(), this.getNextHighestDepth());
            s._x = xPos;
            s._y = yPos;
            s.lbltxt.text = columns*[j];
        //}
        xPos += 20;
    }
    yPos += 20;
    xPos = 10;
}

```

Hope someone will give me shed some light…thanks
