I have created a main class which has got 5 states:
<s:State name="loginState" />
<s:State name="librariesState"/>
<s:State name="createState"/>
<s:State name="profilesState"/>
</s:states>
Each state is created in a new MXML component file and is called in the main class as following:
<components:Homepage includeIn="homeState"/>
<components:LibrariesPage includeIn="librariesState"/>
<components:CreatePage includeIn="createState"/>
<components:ProfilesPage includeIn="profilesState"/>
In homeState I have three buttons which by clicking take me in librariesState, createState and profilesState. My problem is how to call the state view (defined in the main class) in the Homepage MXML component. I tried to write click="currentState='librariesState', but the state LibrariesState is not viewed in Homepage. How can I call a state from the main class in the MXML component?