2 Replies Latest reply on Nov 7, 2014 12:01 PM by Domainscanners

    Set Easing in code?


      Hi, is it possible to set the easing of a particular segment of an animation in code?

      Screen Shot 2014-11-07 at 15.46.36.png

      I would like to randomize the easing function of the BubbleSprite_symbol_12.Rotate spin if possible?




        • 1. Re: Set Easing in code?
          vivekuma Adobe Employee

          The Edge API doesn't expose such functions unlike jQuery animate function.


          Assuming you are using Edge 2014.1, which no longer has dependency on jQuery, so to use the jQuery animate() function you need to import jQuery.js first in the Edge composition.

          But jQuery has only two effects for the animate function ("linear", and "swing").


          If you want to use more effects ("easeOutQuint", "easeInQuad" etc), then you need to import jQuery-UI.js file which has all these additional effects.


          So, if you have both jQuery and jQuery-UI.js then using code similar to below will give you the idea of randomizing the effects:

               sym.$("Rectangle").animate({ top:'5px'}, 750, 'easeOutQuint' );




          • 2. Re: Set Easing in code?
            Domainscanners Level 1

            Thank you!