Home Tutorial Flex Flex4 Components MX Pause Effect in Flex4

 
 

MX Pause Effect in Flex4
Posted on: June 28, 2010 at 12:00 AM
The Pause effect is useful in sequencing effects. You create a pause between two effects by using Pause effect.

MX Pause Effect in Flex4:

The Pause effect is useful in sequencing effects. You create a pause between two effects by using Pause effect. The tag of Pause effect is <mx:Pause>. The syntax is following:

<mx:Pause
id="ID"
/>

In this example you can see how we can use a Pause 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:Script>

<![CDATA[

import mx.effects.easing.*;

]]>

</fx:Script>

<fx:Declarations>

<mx:Sequence id="movePause">

<mx:Move duration="1500" xBy="-200" easingFunction="Bounce.easeOut"/>

<mx:Pause duration="1500"/>

<mx:Move duration="1500" xBy="200" easingFunction="Bounce.easeIn"/>

</mx:Sequence>

</fx:Declarations>

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

width="487" height="228"

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:ApplicationControlBar>

<mx:Image id="roseindia"

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

x="253" y="57"

mouseDownEffect="{movePause}"

width="128" height="128"/>

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

Related Tags for MX Pause Effect in Flex4:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.