StateChangeEvent.CURRENT_STATE_CHANGE(currentStateChange):
StateChangeEvent 类代表当组件的 currentState
属性更改时调度的事件。
中文API: http://www.adobe.com/livedocs/flex/3_cn/mx/events/StateChangeEvent.html
使用方法:
ui.addEventListener(StateChangeEvent.CURRENT_STATE_CHANGE, onCurrentStateChange);
注意: 如果用在主程序Application creationComplete的响应方法中, 可能无法监听首个StateChange事件(进入初始State);
currentStateChange="onCurrentStateChange(event)"
附录: 响应函数
/** On State Change . */ protected function onCurrentStateChange(event:StateChangeEvent):void { printLog("LastState: " + event.oldState + "; currentState" + currentState); }
Trace信息:
LastState: StateEmployeesList; currentStateStateDeptMgt
Flex4 State itemCreationPolicy 设定State组件立即创建 <->
// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.