Home Tutorial Flex Flex4 Components MX AnimateProperty in Flex4

 
 

Share on Google+Share on Google+
MX AnimateProperty in Flex4
Posted on: June 30, 2010 at 12:00 AM
Advertisement
The AnimateProperty Effect is used to animate a numeric property of a component.

MX AnimateProperty Effect in Flex4:

The AnimateProperty Effect is used to animate a numeric property of a component.
The tag of Animateproperty is <mx:Animateproperty>. In this example we use the scaleX property for animate the component.

Example:

<?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">

<fx:Declarations>

<mx:AnimateProperty

id="show"

property="scaleX"

fromValue="1.0"

toValue="2.0"/>

<mx:AnimateProperty

id="hide"

property="scaleX"

fromValue="2.0"

toValue="1.0"/>

</fx:Declarations>

<s:Panel title="MX AnimateProperty Effect Example"

width="402" height="239"

chromeColor="#000000" color="#CCCCCC">

<mx:ApplicationControlBar width="400" horizontalAlign="center">

<s:Label text="Take cursor on image and show the effect."

fontFamily="verdana" color="#000000"/>

</mx:ApplicationControlBar>

<mx:Image id="roseindia"

source="@Embed(source='file:/C:/work/bikrant/image/bus.png')"

x="58" y="49"

rollOverEffect="{show}"

rollOutEffect="{hide}"/>

</s:Panel>

</s:Application>

Output:

Running Application:

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

Download this code

Advertisement

Related Tags for MX AnimateProperty in Flex4:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: June 30, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com