dimensions=new Array(27,20);
///
for (a=0; a<dimensions[1]; a++) {
tileInfo[a]=new Array(dimensions[2]);
}
////
for (b=1; b<=dimensions[0]; b++) {
var tile:Tile=new Tile(b-1*20,a-1*20,colors[Math.floor(Math.random()*numColors)],a-1*dimensions[1]+b);
stage.addChild(tile);
tileInfo[a][b]=tile;//problem is here
}
There's your problem. You are assigning 20 (=dimensions[1]) values to the tileInfo array, but in your second loop you are trying to go through 27 (=dimensions[0]) values. You don't have those 7 values in your array, thus you get the error message.