How can I have the button responding when it is clicked with the message : "you clicked me " I tried but it but it does not work.
import mx.controls.Alert; public function createHandlers(e:Event):void { b1.addEventListener(MouseEvent.CLICK, submitForm); b2.addEventListener(MouseEvent.CLICK, submitForm); } private function submitForm(e:Event):void { // Handle event here. Alert.show("Current Target: " + e.currentTarget.id); Alert.show(" You clicked me"); } ]]></mx:Script> <mx:Button id="b1" label="Click Me"/> <mx:Button id="b2" label="Click Me, Too"/> </mx:Application>