AS3 Code problem
I wrote this code:
match = new Array();
matchHoriz = new Array();
row = 0;
while (row < gridRows)
{
col = 0;
while (col < gridCols)
{
match = getHorizMatch (row, col);
if (match.length > 1)
{
match.unshift(grid[row][col]);
matchHoriz.push(match);
// ***1
}
if (match.length == 0)
{
col++;
}
else
{
col = col + match.length;
}
match.length = 0;
}
row ++;
}
// ***2
If I place trace(matchHoriz) on position // ***1 it shows the correct result (an array with matched objects).
If I place trace(matchHoriz) on position // ***2 it doesn't show anything.
What is wrong about my code???
