# Array problem

**URL:** <https://forum.kirupa.com/t/array-problem/300726>\
**Category:** Uncategorized\
**Created:** [November 26, 2009, 5:19am UTC](https://forum.kirupa.com/t/array-problem/300726 "2009-11-26T05:19:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![n000bie](https://avatars.discourse-cdn.com/v4/letter/n/7993a0/32.png) [@n000bie](https://forum.kirupa.com/u/n000bie)\
**Post date:** [November 26, 2009, 5:19am UTC](https://forum.kirupa.com/t/array-problem/300726/1 "2009-11-26T05:19:36Z")

</div>

I got a 8x8 grid, filled with random movie clips from 7 frames (they got no. 1 to 7).

What am I trying to do (from last 3 days) ?

When clicked on any movie clip get their neighbor movie clip type and if they are same disappear.

This is taken from the first row.

3 2 1 7 2 6 6 6

here If i click the third clip which is 1, check both side compare it with current one and if it is not same do nothing else disappear.

Here is the code i have done so far

```auto
public function clickPiece(e:Event) 
        {
            
            var currPiece:String;
            var match:Array;
            
            currPiece = e.currentTarget.type
            trace(currPiece);
            //trace(grid[0][0].type);
            for(var i:int=1; i<8; i++){
                //trace(grid*[0].type);
                if (currPiece == grid*[0].type) {
                    match.push(grid*[0]);
                    trace (match.length);
                    }
            }
           
          }

```

this code gives me error  
can anyone tell me what shall i do from here… i am stuck
