I am having troubles adding a radiobutton to a VBox in actionscript.
var radioButton:RadioButton = new RadioButton();
radioButton.groupName = "source";
radioButton.label = "label";
radioButton.selected = false;
radioButton.addEventListener(Event.CHANGE, sourceChangeHandler);
vBox.addChild(radioButton);
I first created these radiobuttons in mxml and it worked fine, but now that the radiobuttons need to be dynamically generated in actionscript it doesnt work.
When stepping through in the debugger I get to a binding error (1009) when trying to execute the addchild statement and nothing shows up in the VBox. Is there something I am doing wrong?