header_graphic
header_gradient
 
:: Support :: Additional Slideshow Examples: Javascript XML Loading

This example shows how to add JavaScript support for real-time XML loading to our default Slideshow package. This example utilizes a Slideshow component (500x300 pixels) with custom controls, playlist component, and a dynamic text field that indicates the percentage of download. The caption feature is also used in this example and FlashVars are used to dynamically pass the path for the XML playlist that is loaded upon pageload.

  1. Using your Flash 8/CS3/CS4 authoring software, open an existing FLA that includes the Slideshow component, or install the MXP and open a new document, then add the Slideshow component to the stage and give it the instance name "mySlideshow" as shown in the example FLA (see download info below).

  2. Add a "TextInput" component (in the Flash component menu under "User Interface") to the stage and give it an instance name of "xmlpath" as shown in the example FLA (see download info below).

  3. You will also need to add several lines of action script to the actions panel (scene1: frame 1). The action script can be copied from lines 1-4, 32, and 39-44 in the example FLA (see download info below).

  4. You should change the color of the background and resize it to fit all of the objects on the stage.

  5. Once you are finished modifying the FLA you should save your project, publish a network ready SWF, and embed the SWF in your webpge. Be sure to add the 'id="myFlashMovie"' parameter to both locations in your embed script as shown below:

    <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="620" height="330"
    id="myFlashMovie" >
    <param name="movie" value="slideshow_fullscreen.swf" />
    <param name="FlashVars" value="playlist=images.xml" />
    <embed src="slideshow_fullscreen.swf" width="620" height="330" FlashVars="playlist=images.xml"
    name="myFlashMovie"
    type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
    </object>


  6. You will also need to add the "getFlashMovieObject" and "SendDataToFlashMovie" functions to the header of your web document as shown in the example html file (see download info below).

  7. Now set up the JavaScript (text or thumbnail) links in the body of your web document as shown in the example html file (see download info below). These links are used to load a new XML file into the Slideshow.

:: Download Example Files

External JavaScript Thumbnail Links
thumb1 thumb1 thumb1
External JavaScript Text Links
:: Load XML 1 - Antarctic Wildlife
:: Load XML 2 - Antarctic Research
:: Load XML 3 - Antarctic Ice

footer_graphic

Support - Documentation - Skin Wizard - Sample Skins - Tutorials
Copyright © 2003-2012 Earth Science Agency, LLC - All Rights Reserved