Advanced Dynamic Slideshow Can I pass xml file path by usr10478


									Advanced Dynamic Slideshow:
Advanced dynamic slideshow is version 2 of dynamic slideshow with a lot of new
features and a lot more easy to customize because I have simplified the structure of this
new version a lot simple.

Can I pass xml file path through flashvars?
Yes you can pass the xml file path through the flashvars. The variable for passing xml
file path to slideshow is xmlFile. There are various methods of using flashvars to pass
variable values to swf files. Below is an example of swfobject’s direct method of passing
flash variables to swf file:
var so = new SWFObject("preview.swf?xmlFile=slides2.xml", "slideshow", "100%",
"100%", "8", "#000000");

See index2.html for an example of passing xml file’s path to slideshow swf file.

How to resize the gallery dimensions?
Just set your required width and height of the slideshow in the html embedding code and
it will resize itself without any distortions.

If you want to use slideshow.swf inside another .fla file by copying and pasting inside the
other .fla file or by using the loadMovie command then you will have to change the
dimensions manually for which you need to have general knowledge of flash. But it is not
too hard. What you have to do is to change the following two lines:

        slideshow_bg_main._width = Stage.width;
        slideshow_bg_main._height = Stage.height;

with some fixed values like:

        slideshow_bg_main._width = 600;
        slideshow_bg_main._height = 500;

So that it doesn’t rely on the stage settings of your own .fla file.

Slideshow Configuration Parameters:
There are many settings of the slideshow which can be set through the slides.xml file.

    1. Autoplay
       You can set the autoplay option by setting the autoplay attribute of the slideshow
       tag to “yes”. For example:
       <slideshow autoplay="yes">

    2. Speed of Autoplay
       You can set the autoplay speed option by setting the delay attribute of the
       slideshow tag to your desired number. It should be in seconds. If you the speed of
       the autoplay to be 2 minutes then the value of the speed in seconds will be 120.
       For example:
       <slideshow delay="5">

   3. Thumbnails / umbered Labels
      You can either use thumbnail images of size 30x30 pixels or numbered labels. If
      you want to show images for the thumbnails then set useThumbnails’s value to
      yes, otherwise set it to no. For example:
      <slideshow useThumbnails="yes">

   4. Thumbnail Tooltips
      You can display tooltips when you bring mouse over the thumbnails by setting the
      value of the thumbTooltips parameter of the slideshow node to yes. For example:
      <slideshow thumbTooltips="yes">

   5. Print Functionality
      You can enable/disable the print function by using the printFunction configuration
      parameter. For example to enable printing set the printFunction’s value to yes:
      <slideshow printFunction="yes">

   6. Search Function
      Similarly you can enable/disable the search feature by using the searchFunction
      configuration parameter. For example to display search bar set the
      searchFunction’s value to yes:
      <slideshow searchFunction="yes">

As all the code in the slideshow.fla file is contained in just one keyframe inside the
slideshow movieclip. So you can drag and drop in your design flash file, but as some
movieclips are being used at runtime and are attached from the library through
actionscript so you have to drag all the assets from the slideshow.fla file to your desired
flash file.

Printing Images
Images are scaled to fit on the page. When you click the print icon to print an image it
generates a temp image for the original with white background and removes it once the
print has been initialized. The point is that if you want the background of the image being
printed to be black then you can do so by changing the following line inside the
printImage function:
var printBMP:BitmapData = new BitmapData(current_slide_holder._width,
current_slide_holder._height, false, 0xFFFFFF);
Just change the white color value which is in hexadecimal with black color value, like:
var printBMP:BitmapData = new BitmapData(current_slide_holder._width,
current_slide_holder._height, false, 0x000000);

Image URLs
You can associate an external url with each image using the tag url. But if you want a
particular image not to have external link or you don’t want external links with all the
images then leave the url tags blank. For example:
<url> </url>

All the images are in inside the slides folder/directory and each category has its own
folder/directory. Similarly if you intend to use thumbnails then all the thumbnails are
inside the thumbs folder/directory and each category’s thumbnails are in its own
folder/directory. This is structure is not necessary. You can structure your images as you
like. What you have to do is set the correct paths of the images in the xml file.

I have used Verdana font for the text fields. I have embedded the font for almost all the
text fields. When testing Verdana font should be installed on your system, but once you
publish .swf file the fonts get embedded in the .swf. For embedded fonts you can specify
which character set to embed. I have embedded basic characters, total of 114. If your
requirement is to display non English characters then you will have to change the
embedding settings for all the text fields. Normally the Latin-I character set will solve
your problem, but for languages like Chinese, Japanese you will have to embed the
appropriate character set.

To embed or change the embedding settings for a particular text field do the following:
      • Find a movieclip in the library panel which holds the text field and
         double click it.
      • Select a text field.
      • Bring up the properties panel ( Ctrl+F3 ).
      • Click the Embed… button.
      • Select the character set/sets most appropriate for your requirements.
      • Click ok.
      • And finally republish the .swf file.

         ote: The more you embed the more your .swf file size will be.

       The action script is fully commented so hopefully these comments will help you
       achieve what you want.
See my other files at

To top