Application.application.currentstate = "whatever";
Thanks gsb. I attached the code:
to the click event of the button I repeated and it works great.
Could someone expand on the answer to help me out ? I think it's nearly what I was looking for but I'm not quite sure.
I had a component with 3 states, and I divided that component so that the contents of each state was a separate sub-component, but I forgot that state 2 contained a link which called up state 3 so it is now out of scope. How might I go about redressing this problem ?
try using mx.core.Application.application.currentState='your state name'.
Isn't that the same as the previous answer ? I wasn't sure why I should use 'Application.application' as the state I wish to invoke is part of the parent component not the application itself
hmm then you can use
Got there in the end
I needed Application.application.myComponentID.currentState='statename'.
A lot of my confusion was caused by the fact that I had forgotten the importance of ID (as well as what the ID actually was)
Thanks for the help.