Topic: Link for SWF file


I'm builing a website in which I'm trying to put a viewer.swf file (simple viewer gallery).

I wish not to put it the following folder: httpdocs/viewer.swf.

Instead I wish to put it in this folder:  httpdocs/mypicturesgallery/viewer.swf

Is that possible? Because when I try, it doesn't work. Here is what I'm writing in dreamweaver:

<script type="text/javascript" src="swfobject.js"></script>
<div id="flashcontent">SimpleViewer requires JavaScript and the Flash Player. <a href="">Get Flash.</a></div><script type="text/javascript">var fo = new SWFObject("mypicturesgallery/viewer.swf", "viewer", "800", "600", "8", "#181818");fo.write("flashcontent");    </script>

I don't know why it doesn't work. Your help would be greatly appreciated.



Re: Link for SWF file

Is the HTML page into which you are embedding the viewer located in the root of your web structure (ie. is it directly in the httpdocs folder or in a subfolder)?

With the relative path "mypicturesgallery/viewer.swf", swfobject will be looking for the file 'viewer.swf' in a folder named 'mypicturesgallery' located alongside the HTML page containing the code itself.
If your HTML page is in a subfolder of its own, then you will have to use "../mypicturesgallery/viewer.swf".
Otherwise, try using an absolute path, eg:

var fo = new SWFObject("", "viewer", "800", "600", "8", "#181818");

Also, it is unclear from the code you posted whether or not you have line feeds in between each line of JavaScript.
If you do not have each instruction on a separate line, try this.

If you continue to experience difficulties, please post a URL to your gallery so that we can take a look.

Steven Speirs
SimpleViewer Support Team

Re: Link for SWF file

Great, thanks for the answer!

It works now!