topical media & game development
explorer-controls-RadioButtonExample.mx
explorer-controls-RadioButtonExample.mx
[swf]
flex
<?xml version="1.0"?>
<!-- Simple example to demonstrate RadioButton control. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
import mx.controls.Alert;
</mx:Script>
<mx:Panel title="RadioButton Control Example" height="75%" width="75%"
paddingTop="10" paddingLeft="10" paddingRight="10">
<mx:Label width="100%" color="blue"
text="What year were women first allowed to compete in the Boston Marathon?"/>
<mx:RadioButton groupName="year" id="option1" label="1942"/>
<mx:RadioButton groupName="year" id="option2" label="1952"/>
<mx:RadioButton groupName="year" id="option3" label="1962"/>
<mx:RadioButton groupName="year" id="option4" label="1972"/>
<mx:Button label="Check Answer"
click="Alert.show(option4.selected?'Correct Answer!':'Wrong Answer', 'Result')"/>
</mx:Panel>
</mx:Application>
(C) Æliens
27/08/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.