MX Blur Effect in Flex4


 

MX Blur Effect in Flex4

The Blur effect uses for a blur visual effect to a component. The component will shaded by using this effect.

The Blur effect uses for a blur visual effect to a component. The component will shaded by using this effect.

MX Blur Effect in Flex4:

The Blur effect uses for a blur visual effect to a component. The component will shaded by using this effect. You will set the blur range by using following attribute.

1. blurXFrom
2. blurXTo
3. blurYFrom
4. blurYTo

The tag of Blur effect is <mx:Blur>. In this example you can see how we can use a Rotate effect with 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:Blur id="imageBlurOn"

blurXFrom="0.0" blurXTo="20.0"

blurYFrom="0.0" blurYTo="20.0" duration="500"/>

<mx:Blur id="imageBlurOff"

blurXFrom="20.0" blurXTo="0.0"

blurYFrom="20.0" blurYTo="0.0" duration="500"/>

</fx:Declarations>

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

x="181" y="63"

rollOverEffect="{imageBlurOn}"

rollOutEffect="{imageBlurOff}"/>

</s:Panel>

</s:Application>

Output:

Running Application:

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

0

Download this code

Ads