- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
var numCellsHoriz:uint = Dimensions.WORKING_AREA_WIDTH / cellSize;
var numCellsVert:uint = Dimensions.WORKING_AREA_HEIGHT / cellSize;
var gridElement:Sprite = new Sprite();
for (var horiz:uint = 0; horiz < numCellsHoriz; horiz++)
{
for (var vert:uint = 0; vert < numCellsVert; vert++)
{
var cell:Sprite = gridElement.addChild(new Sprite()) as Sprite;
with (cell.graphics)
{
beginFill((_diffColor) ? ((isInverted) ? 0xEFEFEF : 0xDFDFDF) : ((isInverted) ? 0xDFDFDF : 0xEFEFEF)), drawRect(0,0,cellSize,cellSize);
}
cell.x = cell.width * horiz;
cell.y = cell.height * vert;
_diffColor = !_diffColor;
}
_diffColor = !_diffColor;
}
wvxvw 07.05.2012 21:43 # +1
fixed?
lammar 07.05.2012 23:44 # 0