Home Tutorial Flex Flex4 Components MX Glow Effect in Flex4

 
 

Share on Google+Share on Google+
MX Glow Effect in Flex4
Posted on: June 28, 2010 at 12:00 AM
Advertisement
The Glow effect applies a visual glow effect to a component. The tag of Glow effect is .

MX Glow Effect in Flex4:

The Glow effect applies a visual glow effect to a component. The tag of Glow effect is <mx:Glow>. The Glow effect uses the following attribute:

<mx:Glow
id="ID"
alphaFrom="val"
alphaTo="val"
blurXFrom="val"
blurXTo="val"
blurYFrom="val"
blurYTo="val"
color="themeColor of the application"
inner="false|true"
knockout="false|true"
strength="2"
/>

In this example you can see how we can use a Glow effect With components.

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:Glow id="glowOn"

alphaFrom="1.0"

alphaTo="0.4"

blurXFrom="0.0"

blurXTo="70.0"

blurYFrom="0.0"

blurYTo="70.0"

color="#13B3AA"

duration="1000"/>

<mx:Glow id="glowOff"

alphaFrom="0.4"

alphaTo="1.0"

blurXFrom="70.0"

blurXTo="0.0"

blurYFrom="70.0"

blurYTo="0.0"

color="#13B3AA"

duration="1000"/>

</fx:Declarations>

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

width="487" height="275"

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

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

<s:Label text="Take a 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/Ball.png')"

x="181" y="63"

rollOverEffect="{glowOn}" rollOutEffect="{glowOff}"/>

</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 Glow 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: June 28, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com