Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you are talking about view states the answer is yes, you can listen for the enterState event like this (sorry for the simplicity of the example, it's part of a project I'm working on and I removed any relevant parts of the code):</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="800" minHeight="600" currentState="loading"&gt; &lt;fx:Script&gt; &lt;![CDATA[ import mx.controls.Alert; private function onEnterLoadingState():void{ Alert.show("Enter the loading state.", "Application"); } private function onEnterLoginState():void{ Alert.show("Enter the login state.", "Application"); } private function onEnterAddState():void{ Alert.show("Enter the addUser state.", "Application"); } private function changeState(state:String):void{ currentState = state; } ]]&gt; &lt;/fx:Script&gt; &lt;s:states&gt; &lt;s:State name="loading" enterState="onEnterLoadingState()"/&gt; &lt;s:State name="login" enterState="onEnterLoginState()"/&gt; &lt;s:State name="addUser" enterState="onEnterAddState()"/&gt; &lt;/s:states&gt; &lt;s:Panel id="loadView" includeIn="loading" title="Loading"&gt; &lt;s:Button label="Go to login" click="changeState('login')"/&gt; &lt;/s:Panel&gt; &lt;s:Panel id="loginView" includeIn="login" title="Login"&gt; &lt;s:Button label="Go to addUser" click="changeState('addUser')"/&gt; &lt;/s:Panel&gt; &lt;s:Panel id="addView" includeIn="addUser" title="AddUser"&gt; &lt;s:Button label="Return to loading" click="changeState('loading')"/&gt; &lt;/s:Panel&gt; &lt;/s:Application&gt; </code></pre> <p>And there is an exitState event in case you need it. I hope this helps you.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload