topical media & game development

talk show tell print

lib-flex-animation-code-03-TileTest.ax

lib-flex-animation-code-03-TileTest.ax (swf ) [ flash ] flex


  package
  {
          import com.friendsofed.isometric.DrawnIsoTile;
          import com.friendsofed.isometric.Point3D;
          
          import flash.display.Sprite;
          import flash.display.StageAlign;
          import flash.display.StageScaleMode;
  
          [SWF(backgroundColor=0xffffff)]
          public class @ax-lib-flex-animation-code-03-TileTest extends Sprite
          {
                  public function @ax-lib-flex-animation-code-03-TileTest()
                  {
                          stage.align = StageAlign.TOP_LEFT;
                          stage.scaleMode = StageScaleMode.NO_SCALE;
                          
                          var world:Sprite = new Sprite();
                          world.x = stage.stageWidth / 2;
                          world.y = 100;
                          addChild(world);
                          
                          for(var i:int = 0; i < 20; i++)
                          {
                                  for(var j:int = 0; j < 20; j++)
                                  {
                                          var tile:DrawnIsoTile = new DrawnIsoTile(20, 0xcccccc);
                                          tile.position = new Point3D(i * 20, 0, j * 20);
                                          world.addChild(tile);
                                  }
                          }
                  }
                  
          }
  }


(C) Æliens 18/6/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.