Home Tutorial Flex Flex4 Components Spark AnimateColor effect in Flex4

 
 

Share on Google+Share on Google+
Spark AnimateColor effect in Flex4
Posted on: July 2, 2010 at 12:00 AM
Advertisement
Spark AnimateColor effect changes the color property of the component or target.

Spark AnimateColor effect in Flex4:

Spark AnimateColor effect changes the color property of the component or target.
The tag of AnimateColor effect is <s:AnimateColor>. The syntax of AnimateColor effect is following:

<s:AnimateColor
id=""
colorFrom=""
colorTo=""
duration=""
/>

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>

<s:AnimateColor id="animateColorON"

colorFrom="#FFFFFF"

colorTo="#FF0000"

duration="100"/>

<s:AnimateColor id="animateColorOFF"

colorFrom="#FF0000"

colorTo="#FFFFFF"

duration="100"/>

</fx:Declarations>

<s:Panel title="Spark AnimateColor Effect Example"

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>

<s:Button id="btn"

label="Spark AnimateColor Effect"

x="54" y="62"

fontFamily="Verdana"

height="37"

rollOverEffect="{animateColorON}"

rollOutEffect="{animateColorOFF}"

cornerRadius="20"

fontWeight="bold"

color="#FFFFFF"/>

</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 Spark AnimateColor effect 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: July 2, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com