I’m trying to create the very basics of a isometric map. My engine creates to map fine, but it’s when I want to then control the movie clips.
I’m adding each cell in the grid using and array:
for (var X= 0; X < Engine.Var.GridWidth; X ++)
{
for (var Y = 0; Y < Engine.Var.GridHeight; Y ++)
{
Engine.Var.cellCount ++;
var _X = (X * Engine.Var.cellWidth) + Engine.Var.GridX;
var _Y = (Y * Engine.Var.cellHeight) + Engine.Var.GridY;
cell_mc = new Cell(_X + Engine.Var.GridX ,_Y + Engine.Var.GridY,this.stageRef);
cellHolder.push("cell_mc" + Engine.Var.cellCount);
cell_mc.cell.instanceName = "cell_mc" + Engine.Var.cellCount;
}
}
That bit works fine, it adds the cells to the stage and adds an instance of them to the “cellHolder” array.
But I want to make it so you can drag to map around and explore it. I though I would be able to do some thing like:
for (var i= 0; i < cellHolder.length; i++)
{
cellHolder*.x ++;
}
To sum up I want to be able to use the cellHolder to address the movie clips it holds.
Thanks for any help