Spark Scale3D Effect in Flex4


 

Spark Scale3D Effect in Flex4

The Scale3D effect is used for change the size of component or target along x, y and z-axis.

The Scale3D effect is used for change the size of component or target along x, y and z-axis.

Spark Scale3D Effect in Flex4:

The Scale3D effect is used for change the size of component or target along x, y and z-axis. You can change the scaling in x, y and z directions. The tag of Scale effect is <s:Scale3D>. The syntax of Scale effect is following:

<s:scale3D
id=""
scaleXFrom=""
scaleXto=""
scaleYFrom=""
scaleYTo=""
scaleZFrom=""
scaleZTo=""
duration=""
/>

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

<s:Bounce id="bounce"/>

<s:Scale3D id="scale3dEffect"

autoCenterTransform="true"

duration="500"

scaleXFrom="1.0"

scaleXTo="2.0"

scaleYFrom="1.0&"

scaleYTo="2.0"

scaleZFrom="1.0/font>&"

scaleZTo="2.0"

target="{globe}"

easer="{bounce}"/>

<s:Scale3D id="scale3dEffect1"

autoCenterTransform="true"

duration="500"

scaleXFrom="2.0"

scaleXTo="1.0"

scaleYFrom="2.0"

scaleYTo="1.0"

scaleZFrom="2.0"

scaleZTo="1.0/font>"

target="{globe}"

easer="{bounce}"//>

0

</fx:Declarations>

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

chromeColor="#000000"

1

color="#CCCCCC"

width="467"

height="334">

2

<mx:ApplicationControlBar width="465"

horizontalAlign="center">

<s:Label text="Mouse over on image for showing the effect/font>"

3

color="#000000"

fontFamily="Verdana"/>

</mx:ApplicationControlBar>

4

<mx:Image id="globe"

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

x="169" y="101"

5

rollOverEffect="{scale3dEffect}"

rollOutEffect="{scale3dEffect1}">

<mx:filters>

6

<s:DropShadowFilter id="dsf"

angle="45"

distance="5"

7

color="#808080"/>

</mx:filters>

</mx:Image>

8

</s:Panel>

&</s:Application>

Output:/h3>

9

Running Application:

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

Download this code

0

Ads