Topic: Image path error

Hi,

I'm trying to embed Autoviewer into my web page. I don't want the autoviewer files in my root folder so I've made a new folder called "autoviewer" which contains all the files / images for autoviewer.

I've managed to edit the embed code so that the player loads up by editing the paths to "autoviewer/autoviewer.swf" and "autoviewer/swfobject.js" but the images don't load and I don't know how or where to redirect the path to the image folder.

I read on the forums somewhere that its to do with xmlURL property or something? (http://www.simpleviewer.net/autoviewer/ … tions.html)

Could you please explain in basic terms how to do this, I'm just a beginner!

Thank you!

p.s. This is my code:

<script type="text/javascript" src="autoviewer/swfobject.js"></script>
<div id="flashcontent">AutoViewer 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("autoviewer/autoviewer.swf", "viewer", "800", "600", "8", "#181818");
fo.write("flashcontent");   
</script>

Re: Image path error

You can point AutoViewer towards your gallery's XML file by using the following line immediately before the fo.write("flashcontent"); line:

fo.addVariable("xmlURL", "autoviewer/gallery.xml");

Paths to the images within the XML can be absolute or relative. If relative, then they are relative to the HTML file containing the embedding code (not the XML file itself).

Steven Speirs
SimpleViewer Support Team.

Re: Image path error

Hi Steven, thanks for your reply.

I'm still having a problem. I've added the line of code as you suggested, but now instead of having no images showing and the player being blank, I get a white "x". This did not display before. I have a feeling it is something to do with an incorrect file path still.

The images folder is in the same folder as the gallery.xml (path from root folder autoviewer/images/"photoname")

In the XML document the url is: <url>images/Butterfly.jpg</url> (same format for other images in image folder)

Is this the cause of the problem?

Thanks again for your help.

Re: Image path error

In the XML document the url is: <url>images/Butterfly.jpg</url> (same format for other images in image folder)

Is this the cause of the problem?

Yes.
The entry should be:

<url>autoviewer/images/Butterfly.jpg</url>

... as the path is relative to the HTML file containing the embedding code.

Steven Speirs
SimpleViewer Support Team.

Re: Image path error

images load perfect in dreamweaver but once uploaded to site i only get a white x where image should be

can anyone help??

Re: Image path error

@razself
Please see this FAQ regarding seeing crosses where images should be: http://simpleviewer.net/simpleviewer/su … #trouble_2
If you continue to experience difficulties, please post the URL to your gallery so that we can take a look.

Steven Speirs
SimpleViewer Support Team.

Re: Image path error

its looking for URL /~jetsto/jpegs\006.jpg instead of URL /~jetsto/jpegs/006.jpg

but i cannot figure out how to change the backslash to forward slash as i have changed it in the gallery.xml file

http://box12.host1free.com/~jetsto/

Last edited by razself (2011-11-28 22:38:21)

Re: Image path error

All 13 of your images are displayed in your AutoViewer gallery on my computer (in Firefox 8.0.1, Safari 5.1.1, Chrome 15 and IE9).
Try clearing your browser's cache before reloading the gallery.

Steven Speirs
SimpleViewer Support Team.

Re: Image path error

clearing the cache worked thanks a lot very quick response and spot on fix  smile