Basic AnimateProperty Effect
June 18, 2009 at 8:24 am | Posted in Flex | Leave a commentDefinition:
It will come under the Package of mx.effects. It animates a property or style of a component. For this, we have to specify the property name, start value, and end value of the property to animate. For example, to change the width of a Button control, we have to specify width as the property to animate, and starting and ending width values to the effect.
Source Code:
<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute” backgroundAlpha=”0.5″ backgroundGradientColors=”[0x00ffff,0xff00ff]” alpha=”0.6″>
<mx:Sequence id=”animate”>
<mx:AnimateProperty property=”scaleX” fromValue=”1″ toValue=”5″ duration=”1000″ />
<mx:AnimateProperty property=”scaleX” fromValue=”5″ toValue=”1″ duration=”1000″ />
<mx:AnimateProperty property=”scaleY” fromValue=”1″ toValue=”5″ duration=”1000″ />
<mx:AnimateProperty property=”scaleY” fromValue=”5″ toValue=”1″ duration=”1000″ />
</mx:Sequence>
<mx:Button mouseDownEffect=”{animate}” width=”5%” x=”414.5″ y=”276″ cornerRadius=”10″ alpha=”0.88″ />
</mx:Application>
Thanks & Regards,
R.Kasi Ruby
Leave a Comment »
RSS feed for comments on this post. TrackBack URI
Leave a Reply
Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.