Share on Google+Share on Google+

Create MX Effect using Actionscript in Flex4

In this example we create a MX effect using Actionscript.

Create MX Effect using Actionscript in Flex4:

In this example we create a MX effect using Actionscript. The package of MX effect is mx.effects.*. Inthis example we create a WipeDown effect using Actionscript.


<?xml version="1.0" encoding="utf-8"?>

<s:Application xmlns:fx=""



minWidth="955" minHeight="600"




// Effect package for all effects

import mx.effects.*;

// Create a variable for WipDown Effect

private var myEffect:WipeDown;

private function effect(event:Event):void{

// Make a object of WipeDown Effect

myEffect= new WipeDown();

// Set the duration of the effect


// Assign this effect to the component

roseindia.setStyle('mouseDownEffect', myEffect);




<s:Panel title="Create MX Effect using Actionscript Example"

width="487" height="275"

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

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

<s:Label text="Click on image and show the effect."

fontFamily="verdana" color="#000000"/>


<mx:Image id="roseindia"


x="181" y="63"/>




Running Application:

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

Download this code


Posted on: July 1, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial 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.


Advertisement null