I am trying to assign a few variables to checkboxes that I am adding dynamically to the stage. There are like 40 checkboxes added dynamically and I need to keep track of a few variables for each checkbox.
It will only let me assign a “name” to the checkbox. If I try something else like “Group” (see code), then I get a runtime error:
Error #1056: Cannot create property Grouping on fl.controls.CheckBox.
Does anyone know how to assign variables to checkboxes?
Is it because its a component?
for (var i:Number = 0;i<array.length;i++)
{
cb = new CheckBox();
var mc_cb = checkboxHolder.addChild(cb);
mc_cb.name = array*.Id;
mc_cb.Group = array*.Grouping;
}