Register the submitForm() and debugMessage() handler functions with b1's click event
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="createHandlers(event)">
<mx:Script>
public function createHandlers(e:Event):void {
b1.addEventListener(MouseEvent.CLICK, submitForm);
b1.addEventListener(MouseEvent.CLICK, debugMessage);
}
private function submitForm(e:Event):void {
}
private function debugMessage(e:Event):void {
}
</mx:Script>
<mx:Button id="b1" label="Click Me" />
</mx:Application>
Related examples in the same category