This document applies to SimpleViewer version 1.9. SimpleViewer has been upgraded to version 2.3.0. View upgrade information.
To embed SimpleViewer (or SimpleViewer-Pro) into an existing HTML page do the following:
<script type="text/javascript" src="swfobject.js"></script> <div id="flashcontent">SimpleViewer requires JavaScript and the Flash Player.
<a href="http://www.macromedia.com/go/getflashplayer/">Get Flash.</a></div>
<script type="text/javascript">
var fo = new SWFObject("viewer.swf", "viewer", "800", "600", "8", "#181818");
fo.write("flashcontent");
</script>
To set the gallery size and background color, edit this line from step 3 above:
var fo = new SWFObject("viewer.swf", "viewer", "800", "600", "8", "#181818");
To make SimpleViewer work you need to use the embed method described above. Using Dreamweaver's Insert -> Media -> SWF method will cause SimpleViewer to break. This is because SimpleViewer uses SWFObject to embed the SWF. SWFObject is an industry standard way to embed flash content that handles Flash player detection and upgrade prompts. Using the default Flash embed method in Dreamweaver will not work, since the config options that are set in the Javascript will be ignored.
Do a 'View Source' on this page to see this working example.