Home Tutorial Flex Flex4 Components MX Dissolve Effect in Flex4

 
 

Share on Google+Share on Google+
MX Dissolve Effect in Flex4
Posted on: June 28, 2010 at 12:00 AM
Advertisement
When the Dissolve effect played the component changes from transparent to opaque, or from opaque to transparent.

MX Dissolve Effect in Flex4:

When the Dissolve effect played the component changes from transparent to opaque, or from opaque to transparent. You can use the alpha property. The tag of Dissolve effect is <mx:Dissolve>. There are the following attribute of Dissolve effect.

<mx:Dissolve
id="ID"
alphaFrom="val"
alphaTo="val"
color="val"
/>

In this example you can see how we can use a Dissolve 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:Dissolve id="dissolveOn" alphaFrom="1.0" alphaTo="0.0" duration="1000"

color="#FFFFFF"/>

<mx:Dissolve id="dissolveOff" alphaFrom="0.0" alphaTo="1.0" duration="1000"

color="#FFFFFF"/>

</fx:Declarations>

<s:Panel title="MX Dissolve 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/umbrella.png')"

x="181" y="63"

rollOverEffect="{dissolveOn}"

rollOutEffect="{dissolveOff}"/>

</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 Dissolve 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