Event With Function
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"> <mx:Script> private function clickHandler():void { myLabel.text='You clicked the button'; } </mx:Script> <mx:Label id="myLabel"/> <mx:Button label="Click Me" click="clickHandler()"/> </mx:Application>