Search Flex Components Free

Custom Search

August 25, 2009

Creating an animated base color effect on a Spark Button control in Flex 4

The following example shows how you can create an animating background effect on a Spark Button control in Flex 4 by using the AnimateColor effect on the baseColor style.

Full code after the jump.

"1.0" encoding="utf-8"?>   name="Spark_Button_AnimateColor_baseColor_test"         xmlns:fx=""         xmlns:s="library://"         xmlns:mx="library://">       >          id="animatr"                 target="{btn}"                 colorFrom="haloSilver"                 colorTo="haloBlue"                 colorPropertyName="baseColor"                 duration="400"                 repeatCount="0"                  repeatBehavior="reverse" />     >        id="btn"             label="Spark Button"             horizontalCenter="0" verticalCenter="0"             creationComplete=";"/>   >

View source is enabled in the following example.

Related Flex Tutorials