package{ import flash.display.Sprite; import flash.events.*; public class Ruut2 extends Sprite{ public function Ruut2(){ graphics.beginFill(0x00FF00); graphics.drawRect(-50, -50, 100, 100); rotation=45; x=100; y=100; addEventListener(Event.ENTER_FRAME, liigu); } public function liigu(e:Event):void{ rotation++; } } }