我目前使用:flexglobals.toplevellapplication.component1.component2.currentState='something';
有更好的方法吗?我可以将组件的状态绑定到我的模型中的变量吗?
[Bindable] public var comp1State : String = 'defaultState';
<mx:Container currentState="{model.comp1State}" otherComponentProperties> <!-- other component code including defining the states --> </mx:Container>
model.comp1State = 'nextState'
mate