Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package
- {
- import flash.display.Sprite;
- import flash.display.Bitmap;
- import flash.display.BitmapData;
- import flash.events.Event;
- public class GameObject extends Sprite
- {
- public var tileSize:int;
- public var screen:BitmapData;
- private var screenBitmap:Bitmap;
- public function GameObject()
- {
- super();
- tileSize = 32;
- screen = new BitmapData(tileSize, tileSize, false, 0x000000);
- screenBitmap = new Bitmap(screen , "auto", true);
- addChild(screenBitmap );
- addEventListener(Event.ENTER_FRAME, Step);
- }
- private function step():void
- {
- screen.fillRect(screen.rect, 0x000000);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment