Bookmark and Share
 
:: Support :: Additional Slideshow Examples: Dynamic XML

This example shows how to use FlashVars in the embed scripts to dynamically pass the path for the XML into the Slideshow from the html webpage. By default, all of our example FLA and SWF files have been set up to support FlashVars, but if you are working with a modified FLA or the default Slideshow component from the MXP file, you will need to follow these steps to enable the FlashVars support. This example utilizes a stand-alone slideshow component (300x300 pixels).

  1. Using your Flash 8/CS3/CS4 authoring software, open an existing FLA that includes the Slideshow component, or install the MXP and add the Slideshow component to the stage.

  2. Select the Slideshow on the stage and give it an instance name of "mySlideshow" then open the Component Inspector (in the "Window" menu) and delete the hardcoded path for the XML in the "xmlLocation" parameter field.

  3. Open the actions panel (scene 1: frame 1) and add the following line of action script:

    mySlideshow.loadXML(playlist);

  4. Publish or export a network ready SWF.

  5. To add the Slideshow SWF to your webpage you must add the following scripts to your web document wherever you want the Slideshow to appear. Please note that the SWF path, Flash player size (width and height; should be equal to SWF dimensions), and XML path (FlashVars; red text) are specified in two places. You can alter these variables to meet your needs, and you can specify a different XML path for each instance of the Slideshow on your site (e.g. you could use "playlist=images1.xml" for a header slideshow and "playlist=images2.xml" for a sidebar slideshow on the same page).

    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
    width="300" height="300" >
    <param name="movie" value="slideshow_dynamic.swf" />
    <param name="FlashVars" value="playlist=images.xml" />
    <embed src="slideshow_dynamic.swf" width="300" height="300" FlashVars="playlist=images.xml"
    type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
    </object>


:: Download Example Files


 

Home - FAQs - Support - Contact - Licensing - Refunds - Updates/Upgrades - Shipping - Google Checkout
Free FLV Player - H264 FLV Video Player - MP3 Player - Slideshow - Banner Rotator
- Combo - Zoom - Multichannel - Phantom
HD Video Documentation - MP3 Documentation - Slideshow Documentation - Banner Rotator Documentation
H264 FLV Additional Examples - MP3 Additional Examples - Slideshow Additional Examples - Banner Additional Examples
BitTorrent DNA - Flash Video Player Customization, Flash Video Player Implementation, and Web Video Encoding Services
Copyright © 2003-2008 Earth Science Agency, LLC - All Rights Reserved