I really hate to ask AS questions, but here ya go. I've got 'tile' in my library with 2 frames, to represent the different tiles (im making a tile engine).
I want to make a function to draw a 2-dimensional array that holds the tiles, yet WTF it doesn't work. The funny thing is I've gotten it to work many times before.
var myMap:Array = Array(
[1, 1, 1],
[1, 0, 1],
[1, 1, 1]
);
function buildMap(map)
{
for(ver = 0; ver < 3; ver ++)
{
for(hor = 0; hor < 3; hor ++)
{
_root.attachMovie("tile", "t_" + hor + "_" + ver, _root.getNextHighestDepth());
_root["t_" + hor + "_" + ver]._x = map[ver][hor] * 30;
_root["t_" + hor + "_" + ver]._y = map[ver] * 30;
_root["t_" + hor + "_" + ver].gotoAndStop(map[ver][hor] + 1);
}
}
}
buildMap(myMap);
This is what I am getting. I really need help here, guys.