jan_flanders

Untitled

Nov 23rd, 2012
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package
  2. {
  3.     import flash.display.Sprite;
  4.     import flash.display.Bitmap;
  5.     import flash.display.BitmapData;
  6.     import flash.events.Event;
  7.  
  8.     public class GameObject extends Sprite
  9.     {
  10.         public var tileSize:int;
  11.         public var screen:BitmapData;
  12.         private var screenBitmap:Bitmap;
  13.  
  14.         public function GameObject()
  15.         {
  16.             super();
  17.             tileSize = 32;
  18.             screen = new BitmapData(tileSize, tileSize, false, 0x000000);
  19.             screenBitmap = new Bitmap(screen , "auto", true);
  20.             addChild(screenBitmap );
  21.             addEventListener(Event.ENTER_FRAME, Step);
  22.         }
  23.         private function step():void
  24.         {
  25.             screen.fillRect(screen.rect, 0x000000);
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment