开发者

how to deselect all Radio Button in Radio ButtonGroup on button click in flash as3?

how to deselect all Radio Bu开发者_如何学JAVAtton in Radio Button Group on button click in flash as3?


loop on all button and unselect in a nutsheel you have to do something like this

var nbChildren = myDisplayObjectContainer.numchildren;

for(var i:int = 0 ; i < nbChildren ; i++){
 if( myDisplayObjectContainer.getChildAt(i) is RadioButton )
 {
  var radioButton:RadioButton = myDisplayObjectContainer.getChildAt(i); as RadioButton;
  radioButton.select = false;
 }
}

Of course you have to use correct type instead of : RadioButton and your select/unselect method

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜