I'm trying to programmatically create a RadioButton to test and create a jQuery
version. My ActionScript code works well:
public function createNewRadioButton() : void
{
var rb:RadioButton = new RadioButton();
rb.initModel();
rb.initSkin();
rb.text = "New Radio";
rb.groupName = "group1";
rb.x = radioXpos;
rb.y = 290;
rb.value = radioXpos;
this.addChild(rb);
radioXpos += 100;
}
However, after compiling with Falcon JX and running the Javascript version,
this code causes the browser to complain "TypeError: rb.initModel is not a
function". I guess I'm confused about how to bring the model from ActionScript
over to Javascript. Since normal HTML <input type="radio"> elements do not
require group management (on our part), I didn't need anything like that when I
created the HTML RadioButton, but even without thinking about jQuery,
programmatically creating a RadioButton requires - I think - using
rb.initModel().
--peter