Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个具有各种状态的组件。在 mxml 中,includeIn 和 excludeFrom 属性将状态组作为参数。如何检查当前状态是否属于某个状态组?
State具有以下属性stateGroups:Array of String
State
stateGroups
Array of String
var n:int = states.length; for (var i:int = 0; i < n; i++) { var state:State = states[i]; if (state.name == currentState) { trace("Current state (" + currentState + ") state groups: " + state.stateGroups); break; } }