5 Replies Latest reply on Sep 2, 2011 2:17 AM by daslicht

    Transition easing not working?

    yuck

      Hi, I have a little problem about Changing-State with Transition.

       

      I have below MXML.

       

      <?xml version="1.0" encoding="utf-8"?>
      <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="955" minHeight="600">
         
          <fx:Declarations>
             
          </fx:Declarations>
         
         
          <s:states>
              <s:State name="aState"/>
              <s:State name="bState"/>
          </s:states>
         
          <s:transitions>
              <s:Transition>
                  <s:Move targets="{[btn]}">
                      <s:easer>
                          <s:Bounce />
                      </s:easer>
                  </s:Move>
              </s:Transition>
          </s:transitions>
          <s:Button id = "btn" click="this.currentState = (this.currentState == 'aState')?'bState':'aState';"
                    top.aState="10" left.aState="10" top.bState="300" left.bState="300"
                    />
         
      </s:Application>

       

      When I click a button, it dose move as is transition setting, but It doesn't bounce.

      What do I wrong abour easer setting?

       

      Does anyone help me?

        • 1. Re: Transition easing not working?
          daslicht Level 2

          <?xml version="1.0" encoding="utf-8"?>
          <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="955" minHeight="600">
               
               <fx:Declarations>
                    <s:Power id='b' />
                    <s:Bounce id='bc'/>
               </fx:Declarations>
               
               
               <s:states>
                    <s:State name="aState"/>
                    <s:State name="bState"/>
               </s:states>
               
               <s:transitions>
                    <s:Transition >
                    <s:Parallel duration="1000" target="{btn}">
                         <s:Animate easer="{bc}">
                              <s:SimpleMotionPath property="x"/>
                              <s:SimpleMotionPath property="y"/>
                         </s:Animate>
                    </s:Parallel>
                    <!--     <s:Move targets="{[btn]}" easer="{b}">
                         
                         </s:Move>-->
                    </s:Transition>
               </s:transitions>
               <s:Button id="btn" click="this.currentState = (this.currentState == 'aState')?'bState':'aState';"
                           x.bState="195" y.bState="56"/>
               
          </s:Application>
          

           

          Have Fun

          1 person found this helpful
          • 2. Re: Transition easing not working?
            Shongrunden Adobe Employee

            Thanks for the great, simple, concise code sample.  This appears to be a bug and I've filed it here: http://bugs.adobe.com/jira/browse/SDK-31419

             

            I believe there are some known bugs in the area of animating constraints (like top/left/right/bottom).  If you can use x/y for positioning instead it should work properly.

            1 person found this helpful
            • 3. Re: Transition easing not working?
              yuck Level 1

              Thank you,Shongrunden and also daslicht.

               

              I have confirmed, changing properties 'top' to 'x'/'left' to 'y' just works fine.

              I hope this bug will be fixed soon.

              For the time being, I could use x/y instead of top/left.

               

              Thnaks again.

              • 4. Re: Transition easing not working?
                yuck Level 1

                There are known bugs about easing top/left/bottom/right. Use x/y will clear the issue.

                • 5. Re: Transition easing not working?
                  daslicht Level 2

                  You're Welcome