PDA

View Full Version : Trying to embed simpleviewer to my website.


shakin360
29th of August 2006 (Tue), 01:40
I'm finally getting around to (trying to) build my website. I'm having troubles. I'm using dreamweaver by the way.

from the FAQ on the simpleviewer site.

11. How do I insert SimpleViewer into a pre-existing HTML page?

Copy the contents of your SimpleViewer gallery folder into the folder that contains your HTML page. Now edit your HTML page in a text editor. Add this code into the <head> tag:

<script type="text/javascript" src="swfobject.js"></script>

Add the following code in your HTML where you want SimpleViewer to appear. To set the size of SimpleViewer, replace "640", "480" with your required width and height

<div id="flashcontent">
SimpleViewer requires Macromedia Flash.
<a href="http://www.macromedia.com/go/getflashplayer/">
Get Macromedia Flash.</a> If you have Flash installed,
<a href="index.html?detectflash=false">click to view gallery</a>
</div>

<script type="text/javascript">
var fo = new SWFObject("viewer.swf", "viewer",
"640", "480", "7", "#181818");
fo.write("flashcontent");
</script>




When I follow the directions from the main site all I get is the wording ending with click to view gallery. When you click there it takes you to a seperate window showing just the simpleviewer gallery. It is not "embedded" in my table on my webpage.

Where am I going wrong?

baillie
29th of August 2006 (Tue), 09:56
I presume you are using Internet Explorer, thats where I got the same problem. To solve it change this:

<div id="flashcontent">
SimpleViewer requires Macromedia Flash.
<a href="http://www.macromedia.com/go/getflashplayer/">
Get Macromedia Flash.</a> If you have Flash installed,
<a href="index.html?detectflash=false">click to view gallery</a>
</div>

<script type="text/javascript">
var fo = new SWFObject("viewer.swf", "viewer",
"640", "480", "7", "#181818");
fo.write("flashcontent");
</script>

to this:

<embed src="viewer.swf" bgcolor="#181818" name="viewer" width="640" height="480" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>

It's related to Internet Explorer trying to protect you from anything nasty, although in this case it is blocking something it shouldn't be.

shakin360
29th of August 2006 (Tue), 11:03
actually I'm using firefox, but I'll give it a shot anyways.

EDIT... That worked! Thanks so much! I spent 4 hours trying to get that to work last night.