Share on Google+Share on Google+

Zoom Image with the help of play and reverse mehod in flex

In this tutorial we can illustrate how to zoom Image with the help of play() and reverse() in flex behavior.

Flex Zoom with the help of Action Script:-

In this tutorial you can see how to apply zoom through mouse events if  mouseup on the  image component  are zoomin and mouseout image zoom out. you can see how to use doZoom() for zoom the component in flex and how to use play() function in this tutorial.


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

<mx:Application xmlns:mx="">




public function doZoom(event:MouseEvent):void {

if (zoom.isPlaying) {



else {[], event.type == MouseEvent.ROLL_OUT ? true : false);





<mx:Zoom id="zoom" zoomWidthTo="2" zoomHeightTo="2" zoomWidthFrom=".3" zoomHeightFrom=".3" />

<mx:Panel title="Image Zoom" width="50%" height="50%" horizontalAlign="center"

paddingTop="25" paddingLeft="10" paddingRight="10" paddingBottom="25">

<mx:Image id="img"


scaleX=".3" scaleY=".3"






In this tutorial you can see how to apply Play() for zoom  component and how to use reverse() for zoom component.



Posted on: March 13, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial 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.


Advertisement null