Isometric 2.5D Tiles
/**
* Copyright hucota7 ( http://wonderfl.net/user/hucota7 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/sKLx
*/
package {
import flash.display.Sprite;
public class FlashTest extends Sprite {
public function FlashTest() {
for (var i:int=1;i<=8;i++)
{
for (var j:int=1;j<=8;j++)
{
for (var m:int=1;m<=2;m++)
{
var block:Sprite = new Sprite();
if ((i+j+m)%2)
{
block.graphics.beginFill(0xa0a0a0);
}
else
{
block.graphics.beginFill(0xd0d0d0);
}
block.graphics.moveTo(20,0);
block.graphics.lineTo(0,-10);
block.graphics.lineTo(-20,0);
block.graphics.lineTo(-20,25);
block.graphics.lineTo(0,35);
block.graphics.lineTo(20,25);
block.graphics.endFill();
block.graphics.beginFill(0x000000,.4);
block.graphics.moveTo(0,10);
block.graphics.lineTo(20,0);
block.graphics.lineTo(20,25);
block.graphics.lineTo(0,35);
block.graphics.endFill();
block.graphics.beginFill(0x000000,.25);
block.graphics.moveTo(0,10);
block.graphics.lineTo(-20,0);
block.graphics.lineTo(-20,25);
block.graphics.lineTo(0,35);
block.graphics.endFill();
block.graphics.lineStyle(.1,0x000000,.2);
block.graphics.moveTo(20,0);
block.graphics.lineTo(0,-10);
block.graphics.lineTo(-20,0);
block.graphics.lineTo(-20,25);
block.graphics.lineTo(0,35);
block.graphics.lineTo(20,25);
block.graphics.lineTo(20,0);
block.graphics.moveTo(-20,0);
block.graphics.lineTo(0,10);
block.graphics.lineTo(20,0);
block.graphics.moveTo(0,10);
block.graphics.lineTo(0,35);
block.x=160+i*20-j*20;
block.y=40+j*10+i*10-m*25;
addChild(block);
}
}
}
}
}
}