Mega Code Archive

 
Categories / Flex / Effects
 

Using a custom easing function

<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"     backgroundColor="white">     <mx:Script>         public function myEasing(t:Number, b:Number, c:Number,d:Number):Number {              t/=d;              return b+c*(t);          }     </mx:Script>     <mx:Move id="myEffect" xBy="300" easingFunction="{myEasing}" />     <mx:Button label="Make me move" mouseDownEffect="{myEffect}" /> </mx:Application>