0 Replies Latest reply on May 27, 2010 9:36 PM by dasun1981

    Component Disappear After the Move Animation

    dasun1981

      My Application have 2 states, one for user login and one for the main menu. I'm animating the components as shown in the following code. The transition from user login to main menu works perfectly fine. I have the reverse transition which is giving me issues. When reverse transition triggered, it performs all the movements but at the end of the animation the login component disapears off the screen.

       

      However if I avoid moving it to the -200 on y axis and just used the fade in the first transition and perform the reverse transition, it doesnt disappear. Any help of solving this issue is greatly appriciated.

       

      <s:states>
              <s:State name="Login"/>
              <s:State name="MainMenu"/>
          </s:states>
          <s:transitions>
              <s:Transition fromState="Login" toState="MainMenu">
                  <s:Sequence>
                  <s:Parallel>
                      <s:Fade target="{cmpUserLoginForm}" />
                      <s:Move target="{cmpUserLoginForm}" yTo="-200" />
                  </s:Parallel>   
                  <s:RemoveAction target="{cmpUserLoginForm}" />
                  <s:Parallel target="{cmpMainMenu}">
                      <s:AddAction />
                      <s:Fade />
                      <s:Move yFrom="500" target="{cmpMainMenu}" />
                  </s:Parallel>
                  </s:Sequence>
              </s:Transition>
             
              <s:Transition fromState="MainMenu" toState="Login">
                  <s:Sequence>
                      <s:Parallel target="{cmpMainMenu}">
                          <s:Fade />
                          <s:Move yTo="500" target="{cmpMainMenu}" />
                      </s:Parallel>
                      <s:RemoveAction target="{cmpMainMenu}" />
                      <s:AddAction target="{cmpUserLoginForm}" />
                      <s:Parallel target="{cmpUserLoginForm}">

                          <s:Fade target="{cmpUserLoginForm}" />
                          <s:Move target="{cmpUserLoginForm}" yTo="300" />       
                 
                      </s:Parallel>
                  </s:Sequence>
              </s:Transition>
          </s:transitions>