Add submitForm() and debugMessage() functions as click event handlers
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> private function submitForm(e:Event):void { } private function debugMessage(e:Event):void { } </mx:Script> <mx:Button id="b1" label="Do Both Actions" click='submitForm(event); debugMessage(event);' /> </mx:Application>