Main

Flash Pan Zoom Viewer
Screenshots
Examples
Order Now
  Download Trial

Support

Quick Start & FAQ
Online Help Manual
Contact Us
 
 

 

How to pass image URL to Flash with FlashVars parameter?

By default, Flash Pan Zoom Viewer generates a standalone XML file "viewer_images.xml" in the same folder, and use this file to pass image URL list to the Flash.

This tutorial will guide you how to pass image URL list to Flash with FlashVars parameter. FlashVars is a way to pass variables from HTML to a Flash movie. It's syntax is very similar to a Query String.

To pass the image URL list to the Flash Viewer, you need to add FlashVars to the HTML code that embedding the Flash movie.

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="540" height="300">
<param name="movie" value="panelpanzoom.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="allowFullScreen" value="false" />
<param name="allowScriptAccess" value="always" />
<param name="FlashVars" value="image0=a.jpg&title0=JPEGA&image1=b.jpg&title1=JPEGB&image2=c.jpg&title2=JPEGC" / >
<embed src="panelpanzoom.swf"
FlashVars="image0=a.jpg&title0=JPEGA&image1=b.jpg&title1=JPEGB&image2=c.jpg&title2=JPEGC"
quality="high"
type="application/x-shockwave-flash"
WMODE="transparent"
width="540"
height="300"
allowFullScreen="false"
allowScriptAccess="always"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

The syntax of FlashVars is as following:

image0=a.jpg&title0=JPEGA&image1=b.jpg&title1=JPEGB&image2=c.jpg&title2=JPEGC

The variable=value pairs are joined by sing &.

The variable name of first image url address must be image0, the variable name of its title must be title0. The names of following images must be image1, title1, image2, title2 and so on.

If there is only one image, the name must also be image0 and title0.

You can use full url address for image, for example, http://www.aleosoft.com/flashpanzoom/reg/a.jpg, you can also use relative path, for example, a.jpg, but please note, the relative path is compared to the address of Flash SWF file, not the HTML file that includes the Flash SWF.

Below is an example:

Home | Download | Order Now | Contact us | Links | Press room | Company | Privacy policy | Sitemap
Copyright Aleosoft.com All Rights Reserved.