Spark Move3D Effect in Flex4


 

Spark Move3D Effect in Flex4

The Move3D effect is used for moving the component in the x, y and z coordinate system.

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

0

</mx:ApplicationControlBar>

<mx:VBox id="vbox"

width="136"

1

height="81"

horizontalAlign="center"

verticalAlign="middle"

2

x="27" y="54"

backgroundColor="#555555"

borderStyle="solid">

3

<s:Button label="Move 3D"

id="btn"

cornerRadius="10"

4

fontFamily="Verdana"

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

<mx:filters>

5

<s:DropShadowFilter id="dsf"

angle="45"

distance="5"

6

color="#808080"/>

</mx:filters>

</mx:VBox>

7

</s:Panel>

</s:Application>

Output:

8

Running Application:

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

Download this code

9

Ads