Search Flex Components Free

Custom Search

December 25, 2007

Flex Simple Transition Without States example Source Code

Flex Transitions Sample Source Code:
Create a file:
TransitionsNo.mxml


<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
backgroundAlpha="0">

<mx:Script>
<![CDATA[

private function myMouseOver(event:Event):void
{
myZoom.target=event.currentTarget;
myZoom.captureStartValues();
event.currentTarget.width=100;
event.currentTarget.height=200;
myZoom.play();
}

private function myMouseOut(event:Event):void
{
myZoom.target=event.currentTarget;
myZoom.captureStartValues();
event.currentTarget.width=50;
event.currentTarget.height=100;
myZoom.play();
}

]]>
</mx:Script>

<mx:Text width="500" text="This example uses captureStartValues() to play a Zoom
effect on the Image so it grows to a specified width of 110 pixels." />

<mx:SWFLoader source="../assets/products/HP_rz_1710.png" width="50" height="100"
rollOver="myMouseOver(event)" rollOut="myMouseOut(event)" />

<mx:Zoom id="myZoom" />

</mx:Application>


Related Flex Tutorials