hello everyone i have this project i am working on it isnt for school or anything its just a hobby thing but i would love to find out what i am doing wrong here
ActionScript Code:
////////////////////////////////////////////////////////
//////////////////// ISO GAME //////////////////////////
///////////////// BY D'n'C GameZ ///////////////////////
/////////////// 2/22/2012 2:45 pm //////////////////////
//////////////// ActionScript 2.0 //////////////////////
////////////////////////////////////////////////////////
////////////////////////////////////////////////////////
////////////////////// LOADS ///////////////////////////
////////////////////////////////////////////////////////
mapHolder= new LoadVars();
mapHolder.onLoad = mapLoad;
mapHolder.load("maps.txt");
////////////////////////////////////////////////////////
/////////////////////// MAPS ///////////////////////////
////////////////////////////////////////////////////////
function mapLoad(){
gameMap = mapHolder.Map001;
trace(gameMap); /* trace does work but the
tiles for the map dont show up at all that
is what i need help on to get it working
right and displaying my map */
};
////////////////////////////////////////////////////////
/////////////////////// TILES //////////////////////////
////////////////////////////////////////////////////////
game={tileW:45};
game.TileClass= function(){};
game.TileClass.prototype.clickable=false;
game.TileClass.prototype.frame=100;
game.Tile0= function(){};
game.Tile0.prototype.__proto__=game.TileClass.prototype;
game.Tile0.prototype.clickable=true;
game.Tile0.prototype.frame=1;
/////////////////////////////////////////////////////////
/////////////////////// FUNCTIONS ///////////////////////
/////////////////////////////////////////////////////////
function buildMap(map){
_root.attachMovie("empty","tiles",++d);
game.clip=_root.tiles;
var mapWidth = map[0].length;
var mapHeight = map.length;
for(var i=0;i < mapHeight; ++i){
for(var j=0;j <mapWidth; ++j){
var name = "t_"+i+"_"+j;
game[name]= new game["Tile"+map[i][j]];
game.clip.attachMovie("tile", name, i*100+j*2);
game.clip[name]._x = (j-i)*game.tileW;
game.clip[name]._y = (j+i)*game.tileW/2;
game.clip[name].gotoAndStop(game[name].frame);
game[name].depth=(j+i)*game.tileW/2*300+(j-i)*game.tileW+1;
}
}
}
//////////////////////////////////////////////////////////
///////////////////// INITIALIZE /////////////////////////
//////////////////////////////////////////////////////////
buildMap(gameMap);//comand to set map up
//////////////////////////////////////////////////////////
//////////////////// INSIDE TEXT FILE ////////////////////
///////////////// TEXT FILE NAME maps.txt ////////////////
//////////////////////////////////////////////////////////
/*
Map001=[[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0]
];
*/
//////////////////////////////////////////////////////////
////////////////// FAST OBJECT SETUP /////////////////////
//////////////////////////////////////////////////////////
/*
in order for this to work you need to make 2 movieclips
movieclip 1 name(whatever you want) export for actionscript
identifier name as (empty)
movieclip 2 name(whatever you want) export for actionscript
identifier name as (tile)
and draw a tile in the tiles moviclip
*/