amp
August 28th, 2003, 08:21 PM
How do I center the blocks in my 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[i][j]+1);
}
}
}
buildMap (myMap);
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[i][j]+1);
}
}
}
buildMap (myMap);