el codigo que uso es esto: Crear mapa
Código PHP:
function buildMap(map) {
//attach mouse cursor
_root.attachMovie("mouse", "mouse", 2);
//attach empty mc to hold all the tiles and char
_root.attachMovie("empty", "tiles", 1);
//attach empty mc to hold background tiles
_root.tiles.attachMovie("empty", "back", 0);
//declare clip in the game object
game.clip = _root.tiles;
game.clip._x = 150;
//get map dimensions
var mapWidth = map[0].length;
var mapHeight = map.length;
//loop to place tiles on stage
for (var i = 0; i<mapHeight; ++i) {
for (var j = 0; j<mapWidth; ++j) {
//name of new tile
var name = "t_"+i+"_"+j;
//make new tile object in the game
game[name] = new game["Tile"+map[i][j]]();
if (game[name].walkable) {
var clip = game.clip.back;
} else {
var clip = game.clip;
}
//calculate depth
game[name].depth = (j+i)*game.tileW/2*300+(j-i)*game.tileW+1;
//attach tile mc and place it
clip.attachMovie("tile", name, game[name].depth);
clip[name]._x = (j-i)*game.tileW;
clip[name]._y = (j+i)*game.tileW/2;
//send tile mc to correct frame
clip[name].gotoAndStop(game[name].frame);
}
}
var ob = char;
//calculate starting position
ob.x = ob.xtile*game.tileW;
ob.y = ob.ytile*game.tileW;
//calculate position in isometric view
ob.xiso = ob.x-ob.y;
ob.yiso = (ob.x+ob.y)/2;
//calculate depth
ob.depthshift = (game.tileW-ob.height)/2;
ob.depth = (ob.yiso-ob.depthshift)*300+ob.xiso+1;
//add the character mc
game.clip.attachMovie("char", "char", ob.depth);
//declare clip in the game object
ob.clip = game.clip.char;
//place char mc
ob.clip._x = ob.xiso;
ob.clip._y = ob.yiso;
ob.clip.gotoAndStop(ob.frame);
}
buildMap(_root["myMap1"]);
Como puedo hacer que salga donde yo quiera del flash
gracias de antemano