Let's say that I have a TileList that is rendering data in a
VBox. Eventually the TileList fills up and starts scrolling. I want
to change states when clicking on item in the TileList.
I don't want to place the click-attribute in the TileList,
because it will change states when I am scrolling the list without
actually selecting anything.
I want to say click="currentState='state2'" inside the VBox,
but that does not work because state2 is at the root level, and I
don't know how to get to the root-level (in lack of a better word)
from withing the component.
This is not the proper syntax, so misunderstand me the right
way here... Is there an equivallence to
click="currentState='_root.state2'" in mxml?
Thanks for any suggestions or best practices. I want the easy
This is the general structure...
It doesn't work because there is no state2-state defined
within the mx:component.
In the documentation about changing states it says that I can
go from application level and change states within a component;
like this: click="currentState='mycomponent.anotherstate'" but not
how I can change a state at application level from within a state.
When I try, it says (at runtime) that the state is not defined.
So I don't know why <mx:VBox
click="currentState='state2'"/> doesn't work.