<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
function selected(rtn:RadioButton):void{
Alert.show(""+rtn);
}
]]>
</mx:Script>
<mx:Button label="Check Answer"
click="Alert.show(option1.selected?'Correct Answer!':'Wrong Answer', 'Result')" x="430" y="117"/>
<mx:RadioButton groupName="year" id="option1" label="1942" value="2" x="500" y="49" click="selected(option1)" />
<mx:RadioButton groupName="year" id="option2" label="1952" value="1" x="430" y="49" click="selected(option2)"/>
</mx:Application>