Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/09/2010, 06:00
freedatos
 
Fecha de Ingreso: abril-2003
Mensajes: 587
Antigüedad: 21 años
Puntos: 5
De acuerdo Mapas isometricos

Buenas forofos, estoy creando o intentando hacer un juego en flash multiplayer. E creado un mapa isometrico con AS2 lo que me ocurre es que el mapa sale donde quiere es decir sale en la parte superior izquierda del flash como puedo hacer que carge donde yo digo?

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 0i<mapHeight; ++i) {
        for (var 
0j<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"namegame[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.ob.xtile*game.tileW;
    
ob.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);

y luego lo ejecuto asi:
buildMap(_root["myMap1"]);


Como puedo hacer que salga donde yo quiera del flash

gracias de antemano
__________________
Si la vida te da la espalda tocale el culo