private function customLogEvent(e:Event):void { var a:MouseEvent = MouseEvent(e); trace(a.localY + ":" + a.localX); } private function addListeners():void { b1.addEventListener(MouseEvent.CLICK, customLogEvent); }