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