Visit SlideShowPro.net  Community Forums
SlideShowPro Support Wiki
  
SWF

Embedding

Note: As of June 28, 2011, we are no longer selling the SlideShowPro Player SWF product. We will continue to provide support (and this documentation) for those who purchased it prior to the aforementioned date. Click 'email support staff' in the left column if you have any questions or concerns.

The first step in using SlideShowPro Player SWF is to embed it in a web page. We'll show you how here.

Add SWFObject

The first step is to add the SWFObject javascript library to your web page. This will embed the SWF in your web page, as well as detect Flash Player availability. Copy the following and paste it anywhere inside the <head> area of your document:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>                                                                                     

Create DIV

Now we need a place for the SWF to appear. Anywhere in the <body> area, create a DIV by copying/pasting the code below:

<div id="flashcontent">
	This SlideShowPro photo gallery requires the Flash Player plugin and a web browser with JavaScript enabled.
</div>

Add Javascript

With SWFObject and our DIV in place, now we need the Javascript glue that instructs SWFObject what to do. Also in the <head> of your HTML document (after the SWFObject element added earlier), copy/paste the following:

<script type="text/javascript">
	var flashvars = {
	    loadParams: "false",
		initialURL: escape(document.location)
	}
	var params = { 
		bgcolor: "#000000",   
		allowfullscreen: "true"
	}                
	var attributes = {}
	swfobject.embedSWF("slideshowpro.swf", "flashcontent", "550", "400", "10.0.0", false, flashvars, params, attributes);  
</script>

Upload SWF

Now that the page code is done we need a place for the SWF to live. Connect to your web site using your favorite FTP client and upload the "slideshowpro.swf" file from the "Embed" folder in the Standalone ZIP archive to wherever you want to keep it (e.g., yourdomain.com/swf/slideshowpro.swf). You can use this single SWF for all the slideshows you create using SlideShowPro Player SWF.

Edit Javascript

With slideshowpro.swf uploaded, we recommend changing the swf path in the Javascript code so it can be located easier. Edit the embedSWF method to an absolute path, like the following:

swfobject.embedSWF("http://yourdomain.com/swf/slideshowpro.swf", "flashcontent", "550", "400", "9.0.115.0", false, flashvars, params, attributes);  
</script>

Embed complete!

If you load your HTML document in a browser, you should see the SWF being embedded, and SlideShowPro Player SWF should be displaying a "Slideshow data not found" error. Which means, you guessed it, it's time to assign some content. We'll do that next in Content.

Page last modified by tdominey on August 23, 2010, at 07:38 PM
© 2011 SlideShowPro. All Rights Reserved.