Quote from: rthrash at Oct 13, 2005, 10:08 PM
Sure does take a while to load the bigger image
Here is the
new snippet Zoomify. It loads just needed
image part (not the whole image) and so is usefull for slow modem connections.
Here is the nice
demo:
http://www.dors.biz/modx/zoomify.html
Use
ESC to come back to small image
In order to use this snippet you need:
1. download Zoomifyer EZ v3.0.exe to prepare sliced image
Windows
http://www.zoomify.com/downloads/zoomifyerEZ.zip
Mac
http://www.zoomify.com/downloads/zoomifyerEZ.sit
2. upload folder with sliced image to ’assets/images/zoomify’ (the ZoomifyerEZ will put folder near the original image on your local computer)
3. put zoomifyViewer.swf into ’assets/flash/zoomify’ folder
4. create the new snippet Zoomify with code below
5. call the snippet from your MODx page by [[Zoomify?Img=img_dir_name]] (NOTE! You need to specify directory name, not file name with .JPG)
You can
modify look and feel using settings in the code (zoomifyToolbar and zoomifyNavWindow flashvars).
//Zoomify snippet by Bugaev
//zoomifyViewer.swf © 1999-2003 Zoomify
//
//Usage: [[Zoomify?Img=img_dir_name]] NOTE! You need to specify directory name, not file name with .JPG
//
//You can store directories with sliced image files in the separate folder like 'assets/images/zoomify' (to specify the folder use $imgPath)
//You have to put zoomifyViewer.swf in the 'assets/flash/zoomify' folder
//SETTINGS
$imgPath="assets/images/zoomify";
//END SETTINGS
$output = '<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" WIDTH="450" HEIGHT="450" ID="theMovie">
<PARAM NAME="FlashVars" VALUE="zoomifyImagePath='.$imgPath.'/'.$Img.'&zoomifyToolbar=0&zoomifyNavWindow=0">
<PARAM NAME="MENU" VALUE="FALSE">
<PARAM NAME="SRC" VALUE="assets/flash/zoomify/zoomifyViewer.swf">
<EMBED FlashVars="zoomifyImagePath='.$imgPath.'/'.$Img.'&zoomifyToolbar=0&zoomifyNavWindow=0" SRC="assets/flash/zoomify/zoomifyViewer.swf" MENU="false" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" WIDTH="450" HEIGHT="450" NAME="theMovie"></EMBED>
</OBJECT>';
return $output;