4 Replies Latest reply on May 7, 2010 5:05 PM by mroiler

    Transistion

    mroiler Level 1

      I have this code:

       

      <s:transitions>
           <s:Transition fromState="otherState" toState="normal">
                     <s:Sequence>
                     <s:Parallel target="{otherStateNav}" duration="1000">
                          <s:Fade alphaFrom="1" alphaTo="0"/> 
                          </s:Parallel>
                          <s:Parallel target="{normalStateNav}" duration="1000">
                               <s:Fade alphaFrom="0" alphaTo="1"/>
                               <s:Move xFrom="0" yFrom="-850" xTo="0" yTo="0"/>
                          </s:Parallel>
                </s:Sequence>
           </s:Transition>
      </s:transitions>
      

       

       

      What happens is that the normalStateNav appears, then the otherStateNav fades. The normalState navs then fades and does what it's supposed to do.

      I don't want the normalStateNav appearing until otherStateNav is gone.

        • 1. Re: Transistion
          David_F57 Level 5

          hi,

           

          A minor change to your timing should fix that....

           

          David.

           

           

          <s:transitions>
               <s:Transition fromState="otherState" toState="normal">
                         <s:Sequence>
                         <s:Parallel target="{otherStateNav}" duration="1000">
                              <s:Fade alphaFrom="1" alphaTo="0"/> 
                              </s:Parallel>
                              <s:Parallel target="{normalStateNav}" startDelay="1000" duration="2000">
                                   <s:Fade alphaFrom="0" alphaTo="1"/>
                                   <s:Move xFrom="0" yFrom="-850" xTo="0" yTo="0"/>
                              </s:Parallel>
                    </s:Sequence>
               </s:Transition>
          </s:transitions>

          1 person found this helpful
          • 2. Re: Transistion
            mroiler Level 1

            nope didn't work. it just made it sit for longer when it shouldn't be visible and the normalStateNav effect took longer. is there a way to use <s:Animate/> instead of <s:Transition/> on a state change?

            • 3. Re: Transistion
              Shongrunden Adobe Employee

              When you use effects in a transition you shouldn't define properties like xTo/alphaTo etc. on them directly, but instead define all of those values in the states and let the transition figure out what needs to change.

               

              So your transition should look more like:

              <s:transitions>
                  <s:Transition fromState="otherState" toState="normal">
                      <s:Sequence>
                          <s:Parallel target="{otherStateNav}" duration="1000">
                              <s:Fade />
                          </s:Parallel>
                          <s:Parallel target="{normalStateNav}" duration="2000">
                              <s:Fade />
                              <s:Move />
                          </s:Parallel>
                      </s:Sequence>
                  </s:Transition>
              </s:transitions>

              Then your components would define the position and alpha:

              <c:CustomComponent id="otherStateNav" x.normal="0" x.otherState="-100" alpha.normal="0" alpha.otherState="1"  ... />
              • 4. Re: Transistion
                mroiler Level 1

                that worked. thanks