package{ import flash.display.Sprite; import mx.core.UIComponent; import flash.events.*; public class OmaAndur extends UIComponent{ [Bindable] public var n2it:Number=0; public var ring:Sprite=new Sprite(); public function OmaAndur(){ ring.graphics.beginFill(0XFF0000); ring.graphics.drawCircle(0, 0, 50); ring.graphics.endFill(); addChild(ring); ring.addEventListener(MouseEvent.MOUSE_DOWN, hiirAlla); } private function hiirAlla(event:MouseEvent):void{ n2it++; } } }