warning: Creating default object from empty value in /home/mlange/codes.widged.com/modules/taxonomy/taxonomy.pages.inc on line 34.


Mini tileset/chipset parser in Flex.

Tile manipulation via a SpriteSheet (grid that defines the location of the tiles) and TileSet (combination of grid and image data) abstraction

* Get the bitmap for a tile at a given [row,column]
* @param rowId row index (starts at 0)
* @param columnId column index (starts at 0)
public function getTileBitmap(rowId:int,colId:int):Bitmap
var bitmapData:BitmapData = new BitmapData(_sheet.tileWidth,_sheet.tileHeight, false, 0xFFFFFF);
bitmapData.copyPixels(_bitmap.bitmapData, _sheet.getTileRectangle(rowId, colId), new Point(0, 0));
return new Bitmap(bitmapData);

You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialize correctly.

Demo | Source

Syndicate content
Powered by Drupal, an open source content management system