Visit SlideShowPro.net  Community Forums
SlideShowPro Help Wiki
Recent changes / Search

SlideShowPro for Flash

SlideShowPro for Lightroom

SlideShowPro Standalone

SlideShowPro Director

SlideShowPro Director Hosting

ThumbGrid

SlideShowPro Standalone
Extra customization options
Page last modified by tdominey on January 24, 2010, at 02:26 PM

Here's a list of some of the 'extra' things you can modify that are unique to SlideShowPro Standalone.

Alternate button styles

Embedded in the SWF are four alternate navigation button styles you can use. SlideShowPro uses its own icons by default, but you can change this to the "Quartz" and/or "Pearl" button styles by doing the following.

First, open param.xml in an ASCII/HTML text editor, and at the top you'll see this:

<customParams                
	navButtonStyle = "Default"
/>

Change this value to "Quartz Large", "Quartz Small", "Pearl Large" or "Pearl Small". Save the XML document, and reload your slideshow to see the alternate styles. Note that these alternate styles use graphical elements, and thus are unaffected by changes to the navButtonColor parameter.

Overriding param.xml

Because some web developers would rather assign their parameters dynamically instead of through a static XML file, you have the option of overriding any parameter in param.xml with a different value. This is handled through FlashVars in the player embed code.

For example, if you were using SWFObject to embed your SWF, you'd modify the default markup...

var flashvars = {
	paramXMLPath: "param.xml",
	initialURL: escape(document.location)
}

...to something like this:

var flashvars = {
	paramXMLPath: "param.xml",
	initialURL: escape(document.location),
	xmlFilePath: "http://mydomain.com/otherxml.xml"
}

SlideShowPro will then use the value of xmlFilePath instead of the value entered in param.xml.

Note: Flash treats ampersands (&) as delimiters when reading FlashVars, so if you assign a value that includes an ampersand (like a URL for xmlFilePath) you will need to use a redirect URL, like one generated through Tiny URL.

Turning ExternalInterface off/on

ExternalInterface is a utility through which Flash is able to communicate with Javascript in the web browser. Setting it to "true" allows interactivity like public methods and event listeners (more on those below) to function. ExternalInterface is off by default. To turn it on, add useExternalInterface with a value of "true" to the SWFObject flashvars variable, like so:

var flashvars = {
	useExternalInterface: "true"
}

ExternalInterface can however cause problems if slideshowpro.swf is embedded from a remote site (a domain that's different from where the HTML document is hosted). In those situations, you should not use ExternalInterface and

Accessing public methods

slideshowpro.swf is setup with ExternalInterface hooks so that any SlideShowPro method can be called through Javascript.

The best way to get a feel for how this works is to open the "embed_js_methods.html" document in the "Samples" folder. In the head you'll notice a series of Javascript methods named the same as the SlideShowPro methods to which they relate. They serve as a gateway through which you can call methods inside the SWF and pass parameters, if applicable.

Standalone-only method: getParameter()

Also in the head of the example document you'll see a getParameter() method. This is unique to the standalone version, and allows developers to return the value of any SlideShowPro parameter. The example includes this by popping up the version of the SlideShowPro instance in the SWF in an alert dialogue.

Accessing events

SlideShowPro for Flash broadcasts events for changes in playback, gallery data, asset loading, and many more. You can use these to dynamically render captions, titles, or whatever else comes to your imagination.

To see how events work, we recommending viewing the source of the "embed_js_listeners.html" document in the Samples folder. It contains a scrollable DIV element that updates (via Javascript) whenever gallery, album, or image event data is received.

The crux of event listening centers around the Javascript function onSlideShowProRead(). This method is automatically called by slideshowpro.swf when it is available for event listeners to be attached. Attaching events is easy. Here's an example:

function onSlideShowProReady() {
	var ssp = document.getElementById("ssp");
	ssp.addEventListener("albumData","onAlbumData");
	ssp.addEventListener("galleryInfo","onGalleryInfo");
	ssp.addEventListener("imageData","onImageData");
}

Simply assign addEventListener() to the ssp object, then pass in as attributes the name of the SlideShowPro event, followed by the receiving method in your Javascript.

For a complete list of all the SlideShowPro events you can listen to, see the API (specifically the "EVENTS (AS3) secton").

Assigning start album

SlideShowPro for Flash has a public setStartAlbum() method that can be used to assign which album (and optionally which piece of content contained therein) a slideshow should start with. The standalone version supports a pair of variables that can either be assigned as FlashVars or as parameters when embedding the SWF. The variables are:

startAlbumID
The id of the album the slideshow should start with.

startContentID
The id of the content inside the album (assigned through startAlbumID) that should be loaded first. This parameter is purely optional. Excluding it will load the first piece of content.

To use these, first make sure your albums in the XML file have id attributes (see the images.xml file in the "Samples" folder for an example). Also assign id attributes to img elements if you want to. Borrowing from our SWFObject examples above, you'd assign the variables like so:

var flashvars = {
    startAlbumID: "ssp2",
    startContentID: "1020304",
	paramXMLPath: "param.xml",
	initialURL: escape(document.location)
}

© 2010 Dominey Design Inc. All Rights Reserved.
About | Merchandise | Contact | Privacy policy | Legal | Licensing