Home Tutorial Flex Flex4 Components Spark Scale3D Effect in Flex4

 
 

Share on Google+Share on Google+
Spark Scale3D Effect in Flex4
Posted on: July 3, 2010 at 12:00 AM
Advertisement
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}"//>

</fx:Declarations>

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

chromeColor="#000000"

color="#CCCCCC"

width="467"

height="334">

<mx:ApplicationControlBar width="465"

horizontalAlign="center">

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

color="#000000"

fontFamily="Verdana"/>

</mx:ApplicationControlBar>

<mx:Image id="globe"

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

x="169" y="101"

rollOverEffect="{scale3dEffect}"

rollOutEffect="{scale3dEffect1}">

<mx:filters>

<s:DropShadowFilter id="dsf"

angle="45"

distance="5"

color="#808080"/>

</mx:filters>

</mx:Image>

</s:Panel>

&</s:Application>

Output:/h3>

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