Search code examples
apache-flexairflex4flex-spark

What is the equivalent of easeOutExpo in Flex easing effects?


In Tweener there is a transition of type "easeOutExpo". What is the equivalent in Flex easing classes - listed here [1]?

More Context:

Here is the Tweener code:

Tweener.addTween(container, {width:w, height:h, time:0.25, transition:"easeOutExpo"});

Here is the instance that I want to have the easeOutExpo transition type:

        <s:Scale 
                 scaleYFrom=".5" 
                  scaleYTo="1"
                  scaleXFrom=".5"
                  scaleXTo="1"
                  duration="250"
                  autoCenterTransform="true"
                  applyChangesPostLayout="true"
                  />

[1] http://help.adobe.com/en_US/flex/using/WS91E85D63-A025-4c46-B758-A275D4D3B3FC.html


Solution

  • That would be the Power easing, with easeInFraction set to 0. You'll need to figure out the proper exponent by some trial and error if you want to match the algorithm used by Tweener.

    <fx:Declarations>
        <s:Power
            id='expoEaseOutEquivalent'
            easeInFraction='0'
            exponent='8' />
    
        <s:Scale
            easer='{expoEaseOutEquivalent}'
            scaleYFrom='.5' 
            scaleYTo='1'
            scaleXFrom='.5'
            scaleXTo='1'
            duration='250'
            autoCenterTransform='true'
            applyChangesPostLayout='true' />
    </fx:Declarations>