Advertisement
Advertisement
| 05.30.2008 at 07:47AM PDT, ID: 23444757 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: |
var answerX:int = -220;
var answerY:int = -85;
var spacing:int = 25;
var theUserAnswer:int;
var answerChoices:Array = new Array("This is text for option a","This is text for option b","This is text for option c","This is text for option d");
var myGroup:RadioButtonGroup = new RadioButtonGroup("group1");
myGroup.addEventListener(Event.CHANGE, changeHandler);
for(var i:int = 0; i < 4 ; i++) {
var rb:RadioButton = new RadioButton();
rb.textField.autoSize = TextFieldAutoSize.LEFT;
rb.setSize(550,150); // This does not work
rb.useHandCursor = true;
rb.label = answerChoices[i];
rb.group = myGroup;
rb.value = i + 1;
rb.x = answerX;
rb.y = answerY + (i * spacing);
rb.textField.wordWrap = true;
addChild(rb);
}
|