Mega Code Archive

 
Categories / Flex / Components
 

RadioButton click event handler

<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">     <mx:Script>                  import flash.events.Event;         private function handleA(event:Event):void {             myTA.text="A";         }         private function handleB(event:Event):void {             myTA.text="B";         }         private function handleC(event:Event):void {             myTA.text="C";         }            </mx:Script>     <mx:RadioButton groupName="cardtype" id="americanExpress" label="American Express" width="150" click="handleA(event);" />     <mx:RadioButton groupName="cardtype" id="masterCard" label="MasterCard" width="150" click="handleB(event);" />     <mx:RadioButton groupName="cardtype" id="visa" label="Visa" width="150" click="handleC(event);" />     <mx:TextArea id="myTA" /> </mx:Application>