Spark Animate effect animates any property of the component or target.
Spark Animate effect animates any property of the component or target.Spark Animate effect animates any property of the
component or target. In this example we create a instance of the
SimpleMotionPath class for each property to animate. The tag of Animate effect
is <s:Animate>. The syntax of Animate effect is following:
<s:Animate
id=""
target=""
duration=""
/>
|
<?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">target=" {btn}" duration="500">valueFrom=" 1.0" valueTo="2.0"/> <s:SimpleMotionPath property="scaleY"valueFrom=" 1.0" valueTo="2.0"/> </s:Animate> <s:Animate id="sizeDecrease"target=" {btn}" duration="500"> <s:SimpleMotionPath property="scaleX"valueFrom=" 2.0" valueTo="1.0"/>valueFrom=" 2.0" valueTo="1.0"/> </s:Animate>chromeColor=" #000000"color=" #CCCCCC" width="309" height="184"> <mx:ApplicationControlBar horizontalAlign="center" width="307"> <s:Label text="Mouse over on button and show the effect"color=" #000000"fontFamily=" Verdana"/> </mx:ApplicationControlBar>label=" Spark Animate Effect"x=" 3" y="45"rollOverEffect=" {sizeIncrease}"rollOutEffect=" {sizeDecrease}"fontFamily=" Verdana"/>&</s:Application> |

To view this page ensure that Adobe Flash Player version 10.0.0 or greater is installed.