there is probably a super basic solution to this but i cant seem to 
find any information on making checkboxes with actionscript instead 
of laying them out with a repeater in mxml

Here's my problem...
I want to make checkboxes, in mxml the click event is triggered on 
toggle.
So if I had laid it out in mxml it would look like this:

<mx:CheckBox id="cbox" selected="{myChoice.currentItem.selected}" 
label="{myChoice.currentItem.label}" click="updateFld(event);" />


However, I am doing it through actionscript so I have this:

var cbox:CheckBox = new CheckBox();
cbox.selected = myChoice.currentItem.selected;
cbox.label = myChoice.currentItem.label;
labelPanel.addChild(cbox);

The problem comes in when I want to add functionality on toggle.
I can't type cbox.click = updateFld and I'm not sure what events I 
can listen for on it.

Little help on how to handle this?



Reply via email to