Re: Embedding Simpleviewer
Hello all,
As this is my first post on this forum I'd like to thank all the people above me for their guidance. I have had lots of useful input and have improved my simpleviewer a lot already. However I still have the issue that dreamweaver CS4 shows my pictures, while IE / Firefox do not.
I have read on several websites that Dreamweaver has trouble using the SWFObject.swf. And that you have to use a specific script in the <head> section. Well take a look below as I described my situation. And thanks in advance!
I am building a website and want to embed simpleviewer to a certain page. However I will use multiple simpleviewers on my website eventually (as photographer I will have 3-4 categories that are shown seperately) and thus put each gallery in a different folder for clarity.
Using Photoshop CS4 to make my gallery, I also get an index with the following script:
<script type="text/javascript" src="Mensen/swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.galleryURL = "Mensen/gallery.xml";
//flashvars.firstImageIndex = "0";
//flashvars.preloaderColor = "#FFFFFF";
var params = {};
params.allowfullscreen = true;
params.allowscriptaccess = "always";
params.bgcolor = "000";
swfobject.embedSWF("Mensen/simpleviewer.swf", "flashContent", "100%", "100%", "9.0.124", false, flashvars, params);
</script>
As you can see I already adjusted the link of the swfobject.js, the gallery.xml and the simpleviewer.swf to the correct directory "Mensen/" (Dutch for people). Using this script in the <Head> section combined with the <div id="flashContent"> in the <body> section I can view the simpleviewer in Dreamweaver fine [using 'liveview'].
However, when I use a browser to view the website the area of the simpleviewer is empty. Only the background shows.
Now I've read on multiple fora and websites that to embed correct I should use the following script:
<script type="text/javascript" src="Mensen/swfobject.js"></script>
<script type="text/javascript">
var fo = new SWFObject("Mensen.simpleviewer.swf", "viewer", "800", "600", "8", "#181818");
fo.addVariable("xmlDataPath", "Mensen/gallery.xml");
fo.write("flashContent");
</script>
Similar to the first script, I've already adjusted the references. (again using the div flashContent)
Now I would expect that the 2nd script would work as well, but it does not. Not even in Dreamweaver I get to see the simpleviewer.
Am I missing something here?
As I am still building my website I do not have bought space to put things on. If complete code is required, please let me know and i'll [quote/ it for you.
Thanks in advance and my apology for necromancing this topic back to life, but it fits my problem perfectly.
Greetz,
Oliver