I am trying to make a AIR app that is a test. I have radiobuttons with a value
of either 0 or 1 depending on if its correct or not. I want to pass the value
to a function that keeps score. I am running into a problem on determining the
value of the passed question to see if the app should add a 1 to the score or
not. I keep getting 'Error #1069: Property value not found on Number and there
is no default value.' when I click the button.
Here is my radiobuttongroup:
<mx:Label fontWeight="bold" text="1. Which layer(s) of the OSI Reference Model
provide(s) for internetwork connectivity?" />
<mx:RadioButtonGroup id="group1" />
<mx:RadioButton paddingLeft="10" groupName="group1" label="Data Link"
value="0" selected="true" />
<mx:RadioButton paddingLeft="10" groupName="group1" label="Physical"
value="0" />
<mx:RadioButton paddingLeft="10" groupName="group1" label="Session"
value="0" />
<mx:RadioButton paddingLeft="10" groupName="group1" label="Network"
value="1" />
<mx:RadioButton paddingLeft="10" groupName="group1" label="Presentation"
value="0" />
<mx:Button label="Next" click="testMod.checkSingle(group1.selectedValue)" />
Here is my function:
public function checkSingle(answer:Object):void {
if (answer.value !=0) {
Application.application.score += 1;
}
nextQuestionPlease();
}
How can I get it to find the value and determine if it should add 1 or not.
Thanks.