Click event attribute can take ActionScript code as its value
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Button id="button1" label="Click here!" width="100" fontSize="12" click="text1.text='A';" /> <mx:TextArea id="text1" /> </mx:Application>