我有一些将切换设置为 true 的按钮。我正在尝试将按钮的状态重新设置为未选中。但是,我不能像这样直接访问按钮:button.selected=false。
我正在访问 HBox 的子按钮,它们是按钮。UIComonent 没有选定的属性。那么,如何在下面的这段代码中取消选择切换?
for (var j : int=0; j < theHBox.numChildren; j++){
var child : DisplayObject = theHBox.getChildAt(j);
var myButton:UIComponent = child as UIComponent;
myButton.setStyle("borderColor", "blue");
myButton.visible = true;
}