
27-08-08, 16:13
|
|
Junior Member
|
|
Join Date: Aug 2008
Posts: 6
Rep Power: 0
|
|
|
Radiob Buttons and Check Boxes
|
|
I am trying to add set of Radio Buttons and 2 Checkboxes using ActionScript 3
I am stuck!
I am using the Felp form with image to email and trying to modify it.
I can get the RadioButtons and Checkboxes to work in a standalone file but when I try to add them to Main.as I get all kind of errors. This is what I am using
import fl.controls.CheckBox;
import fl.controls.RadioButton;
var homeCh:CheckBox = new CheckBox();
var underRb:RadioButton = new RadioButton();
var overRb:RadioButton = new RadioButton();
addChild(homeCh);
addChild(underRb);
addChild(overRb);
underRb.groupName = "valueGrp";
overRb.groupName = "valueGrp";
homeCh.move(200, 100);
homeCh.width = 120;
homeCh.label = "Own your home?";
underRb.move(220, 130);
underRb.enabled = false;
underRb.width = 120;
underRb.label = "Under $500,000?";
overRb.move(220, 150);
overRb.enabled = false;
overRb.width = 120;
overRb.label = "Over $500,000?";
homeCh.addEventListener(MouseEvent.CLICK, clickHandler);
function clickHandler(event:MouseEvent):void {
underRb.enabled = event.target.selected;
overRb.enabled = event.target.selected;
}
Any help?
Thanks |
|