Share on Google+Share on Google+

MX Sequence Effect in Flex4

Ads
The Sequence effect is used to play multiple effects one after the other according they are added.

MX Sequence Effect in Flex4:

The Sequence effect is used to play multiple effects one after the other according they are added. The tag of Sequence Effect is <mx:Sequence>. In this example you can see how we can use Sequence Effect in application.

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>

<!-- Sequence Effect -->

<mx:Sequence id="sequenceEffect">

<mx:Zoom id="zoomIn"

originX="175"

originY="50"

zoomHeightTo="1.5"

zoomWidthTo="1.5"

duration="1500"/>

<mx:Rotate id="imageRotate"

originX="175"

originY="50"

angleFrom="0"

angleTo="360"

duration="500"

repeatCount="1"/>

<mx:Pause/>

<mx:Rotate id="imageRotate1"

originX="175"

originY="50"

angleFrom="360"

angleTo="0"

duration="500"

repeatCount="1"/>

<mx:Zoom id="zoomOUT"

originX="175"

originY="50"

zoomHeightTo="1.0"

zoomWidthTo="1.0"

duration="1500"/>

</mx:Sequence>

</fx:Declarations>

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

width="497" height="458"

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

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

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

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

</mx:ApplicationControlBar>

<mx:Image id="roseindia"

source="@Embed(source='file:/C:/work/bikrant/image/roseindia.gif')"

x="125" y="191"

mouseDownEffect="{sequenceEffect}"

width="245" height="81"/>

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

Advertisements

Ads

Posted on: June 30, 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.

Ads

Advertisement