<?xml version="1.0"
encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundGradientAlphas="[1.0, 1.0]"
backgroundGradientColors="[#8E4343, #8E4343]">
<mx:Script>
<![CDATA[
private var statement:Array = ["I","love Flex."];
private function displayAnswer(txt:String):void{
answer.htmlText = statement[0] + " <u>" + txt + "</u> " + statement[1];
}
]]>
</mx:Script>
<mx:Panel title="RadioButton" layout="vertical" color="0xffffff" borderAlpha="0.15"
paddingTop="10" paddingRight="10" paddingBottom="10" paddingLeft="10" horizontalAlign="center" x="247" y="59">
<mx:Text color="0x323232" fontWeight="bold" text="Which word best completes the
statement below?" />
<mx:VBox>
<mx:RadioButton groupName="survey" id="word1" label="totally" color="0x323232"
click="displayAnswer(word1.label);" />
<mx:RadioButton groupName="survey" id="word2" label="do" color="0x323232"
click="displayAnswer(word2.label);" />
<mx:RadioButton groupName="survey" id="word3" label="kind of" color="0x323232"
click="displayAnswer(word3.label);" />
<mx:RadioButton groupName="survey" id="word4" label="do not" color="0x323232"
click="displayAnswer(word4.label);" />
</mx:VBox>
<mx:Text id="answer" fontSize="16" fontWeight="bold" color="0x0050AA"
creationComplete="displayAnswer(' ');" />
</mx:Panel>
</mx:Application>
No comments:
Post a Comment