Home Tutorial Flex Flex4 Components Spark Move3D Effect in Flex4

 
 

Share on Google+Share on Google+
Spark Move3D Effect in Flex4
Posted on: July 3, 2010 at 12:00 AM
Advertisement
The Move3D effect is used for moving the component in the x, y and z coordinate system.

Spark Move3D Effect in Flex4:

The Move3D effect is used for moving the component in the x, y and z coordinate system. If you specify the moving in z direction the effect will look like a Zoom effect.
The tag of Move3D effect is <s:Move3D>. The syntax of Move3D effect is following:

<s:Move3D
id=""
xBy=""
yBy=""
duration=""
target=""
/>

In this example you can see how we can use a Move3D effect in your 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>

<s:Linear id="linearEasing"/>

<s:Move3D id="move3dEffect"

xBy="300"

zBy="300"

yBy="100"

duration="500"

autoCenterTransform="true"

target="{vbox}"

repeatCount="2"

repeatBehavior="reverse"

easer="{linearEasing}"

autoCenterProjection="true"/>

</fx:Declarations>

<s:Panel title="Spark Move3D effect Example"

chromeColor="#000000"

color="#CCCCCC"

width="398"

height="258">

<mx:ApplicationControlBar width="396"

horizontalAlign="center">

<s:Label text="Click on Button for showing the effect"

color="#000000"

fontFamily="Verdana"/>

</mx:ApplicationControlBar>

<mx:VBox id="vbox"

width="136"

height="81"

horizontalAlign="center"

verticalAlign="middle"

x="27" y="54"

backgroundColor="#555555"

borderStyle="solid">

<s:Button label="Move 3D"

id="btn"

cornerRadius="10"

fontFamily="Verdana"

click="{move3dEffect.end();move3dEffect.play();}"/>

<mx:filters>

<s:DropShadowFilter id="dsf"

angle="45"

distance="5"

color="#808080"/>

</mx:filters>

</mx:VBox>

</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 Spark Move3D 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: July 3, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com