package { import flash.display.Sprite; import flash.events.Event; public class FlashTest extends Sprite { public var test :Sprite; public function FlashTest() { test = new Sprite(); addChild(test); test.graphics.beginFill(0xff0000); test.graphics.drawRect(-50, -50, 100, 100); test.x = stage.stageWidth/2; test.y = stage.stageHeight/2; addEventListener(Event.ENTER_FRAME, onRenderTick); } private function onRenderTick(e:Event=null):void { test.rotationY++; } } }