Couple of questions: 1. Is there a way to set the state at runtime? Say you want load a prototype and would like an object to assume a state other than default?
2. Is there a way to dynamically parent something based on state. Say on stateA you want it parented to a scroll container. On stateB you want it parented to another object?
I found a hack around both of these issues. Just thought I'd ask and see if you ninja's out there have some experience with these things. Thanks
1. object.stateSwitch 'state'
I guess on the other one...maybe not exactly the answer to the condition of your question: What if you just switched the parent on a click of the thing that triggers the state change?
button.onClick -> child.parent = if !child.parent then scroll else null