How do I center the blocks in my AS?
[AS]fscommand ( “allowscale”, false );
myMap = [ [0,0,0],
[0,0,0],
[0,0,0] ];
tileW = 32;
tileH = 32;
function buildMap (map) {
var mapWidth = map[0].length;
var mapHeight = map.length;
for (var i = 0; i<mapHeight; ++i) {
for (var j = 0; j<mapWidth; ++j) {
this.attachMovie(“tile”, “t_”+i+""+j, ++d);
this["t"+i+""+j].x = (j*tileW);
this["t"+i+""+j].y = (i*tileH);
this["t"+i+"_"+j].gotoAndStop(map*[j]+1);
}
}
}
buildMap (myMap);[/AS]