Definition:
<!– controls\button\RBEvent.mxml –>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml”>
<mx:Script>
<![CDATA[
import flash.events.Event;
private function handleAmEx(event:Event):void {
// Handle event.
myTA.text="Got Amex";
}
private function handleMC(event:Event):void {
// Handle event.
myTA.text="Got MasterCard";
}
private function handleVisa(event:Event):void {
// Handle event.
myTA.text="Got Visa";
}
]]>
</mx:Script>
<mx:RadioButton groupName=”cardtype”
id=”americanExpress”
label=”American Express”
width=”150″
click=”handleAmEx(event);”/>
<mx:RadioButton groupName=”cardtype” id=”masterCard” label=”MasterCard” width=”150″ click=”handleMC(event);”/>
<mx:RadioButton groupName=”cardtype” id=”visa” label=”Visa” width=”150″ click=”handleVisa(event);”/>
<mx:TextArea id=”myTA”/>
</mx:Application>