PDA

View Full Version : ZOOM Gallery (Photo)


neatman
01-19-2006, 04:04 PM
Y'all,

I am seeking an actionscript based flash solution to allow zooming photos for details. I would like something that doesn't require the viewer to download a plug-in. (zoomify)

Does anyone have an suggestions on tutorials or a concept that I can start with? I really like this example. Does anyone know how to do this?

http://www.sundancecatalog.com/shopping/product/detailmain.jsp?itemID=7878&itemType=PRODUCT&iMainCat=4&iSubCat=27&iProductID=7878

(Click the large image)

Thanks in advance.
NeatMan

neatman
01-19-2006, 07:13 PM
Y'all,

I am seeking an actionscript based flash solution to allow zooming photos for details. I would like something that doesn't require the viewer to download a plug-in. (zoomify)

Does anyone have an suggestions on tutorials or a concept that I can start with? I really like this example. Does anyone know how to do this?

http://www.sundancecatalog.com/shopping/product/detailmain.jsp?itemID=7878&itemType=PRODUCT&iMainCat=4&iSubCat=27&iProductID=7878

(Click the large image)

Thanks in advance.
NeatMan

Paerez
01-19-2006, 07:18 PM
I wrote one of these. Its pretty simple. Use a scrollpane and use scrollpane.load to load an image. Then you record its dimensions (like 800x600). Then, you make a slider. Then you set the onRelease of the slider to compute its distance from the start to the end to get a number. Then you use a linear transformation to change that number to a number between 1 and 10 (for a 10x maximum magnification).

Use this number (time 100) as the xscale and yscale for scrollpane.content. If you want to center as you zoom, you have to do some math to figure out the increase in x pixels and y pixels after the scale, and subtract half from the content's current _x and _y. Also you use startdrag and stopdrag on the content to move it around.

theDude78
01-19-2006, 07:28 PM
I would think you would need to start with an obviously larger HIGH rez image of what you want to zoom and then somehow add the scale factor to each button press. Sadly I'm an aspiring actionscripter and all I can say is good luck and I apologize that I can't be of more assistance.

rnby
01-23-2006, 03:44 PM
I wrote one of these. Its pretty simple. Use a scrollpane and use scrollpane.load to load an image. Then you record its dimensions (like 800x600). Then, you make a slider. Then you set the onRelease of the slider to compute its distance from the start to the end to get a number. Then you use a linear transformation to change that number to a number between 1 and 10 (for a 10x maximum magnification).

Use this number (time 100) as the xscale and yscale for scrollpane.content. If you want to center as you zoom, you have to do some math to figure out the increase in x pixels and y pixels after the scale, and subtract half from the content's current _x and _y. Also you use startdrag and stopdrag on the content to move it around.

could me please show me your example

thanks in advance