Easing Demo : Easing « Effects « Flex






Easing Demo

Easing Demo
         
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
  
  <mx:Script>
    
      import mx.effects.easing.Bounce;
    
      private function dropBall():void
      {
        myImage.y = 0;
        bouncingBall.play();
      }
  
  </mx:Script>
  
  <mx:Move id="bouncingBall" 
           target="{myImage}" 
           yTo="{platform.y-myImage.height}"
           easingFunction="Bounce.easeOut" 
           duration="2000"
           suspendBackgroundProcessing="true"/>
  
  <mx:Image id="myImage" source="@Embed('a.png')" horizontalCenter="0" y="{0-myImage.height}"/>
  
  <mx:Button label="Bounce Ball" click="dropBall()" right="10" bottom="10"/>
  <mx:Canvas id="platform" width="200" height="75" horizontalCenter="0" bottom="0"/>
  
</mx:Application>

   
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.Using a custom easing functionUsing a custom easing function
2.Creating a custom easing functionCreating a custom easing function
3.Resize with easing functionResize with easing function
4.Bounce and Elastic easing classesBounce and Elastic easing classes