PDA

View Full Version : Flex Image Zoom


flashdeva
04-21-2009, 08:45 PM
I am working on a flex project where a swf file loaded into a image component that is contained in a canvas.

>>Now when the user clicks on any point on the image, the image has to zoom in from that point and
>>in the next click it has to zoom out from the same point.
>>When the zoom in happens, the image has to be centered around the point of zoom.

How to achieve this in Flex. Any help will be greatly appreciated. Thanks in advance.

kamelito
05-08-2009, 09:44 AM
here you got your happiness:
http://www.adobe.com/devnet/flex/samples/fig_panzoom/

checkout the class contentRectangle and especially the function scaleByOrigin(..).