Mega Code Archive

 
Categories / Flex / Components
 

Access button id that triggered the event

<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">     <mx:Script>     import mx.controls.Alert;     private function myEventHandler(e:Event):void {         Alert.show("The button " + e.currentTarget.id + " was clicked");     }   </mx:Script>     <mx:Button id="b1" label="Click Me" click="myEventHandler(event)" /> </mx:Application>