Handle Button click event
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> import mx.controls.Alert; public function handleEvent():void { mx.controls.Alert.show("AAA"); } </mx:Script> <mx:Button label="Click on me" click="handleEvent()" /> </mx:Application>