button.addEventListener(MouseEvent.CLICK, doSmth); private function doSmth(e:MouseEvent):void { //ололол }