Topic: embedding autoviewer to dreamweaver-HELP!

I've tried embedding this code to my html page in dreamweaver as it says to do:

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

And it doesn't work. It just shows the "Get Flash" message on my page. I have my gallery folder in my site root folder. The examples that came with the autoviewer pro install don't help me because I don't know what to do with them. I'm not code-savvy and viewing sources just confuses me. I'm obviously new at this and would appreciate help asap. thanks!

Re: embedding autoviewer to dreamweaver-HELP!

You need to change the code so that it looks at your gallery folder.  Make the changes that are in bold (put the name of your folder in where I've put "foldername"):

<script type="text/javascript" src="foldername/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("foldername/autoviewer.swf", "viewer", "800", "600", "8", "#181818");
fo.addVariable("xmlURL", "foldername/gallery.xml");
fo.write("flashcontent");   
</script>

Then you'll need right-click on the gallery.xml document and click "open with."  Choose notepad. Then do a find and replace.  Find "images" and replace it with "foldername/images"

That should make it work--if I understood your post correctly.

The other option would be to leave the code the same and copy all of the contents of the gallery folder into the same folder where your home page is.  Make sure you delete the index.html file in the gallery folder before you copy the contents or it will replace your index.html file in your main folder.

Last edited by Switch (2010-02-18 17:37:47)

Re: embedding autoviewer to dreamweaver-HELP!

I tried this (my gallery folder name is "flash" in my site root folder):

<script type="text/javascript" src="flash/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("flash/autoviewer.swf", "viewer", "800", "600", "8", "#181818");
fo.addVariable("xmlURL", "flash/gallery.xml");
fo.write("flashcontent");   
</script>

And this is my gallery.xml code:

<?xml version="1.0" encoding="UTF-8"?>
<gallery frameColor="0x181818" frameWidth="5" imagePadding="20" displayTime="6" enableRightClickOpen="false">
<image>
   <url>flash/images/AS_windowpose.jpg</url>
   <caption>AS_windowpose.jpg</caption>
   <width>316</width>
   <height>480</height>
</image>
<image>
   <url>flash/images/AS_rockingchair.jpg</url>
   <caption>AS_rockingchair.jpg</caption>
   <width>430</width>
   <height>776</height>
</image>
<image>
   <url>flash/images/AS_windowbear.jpg</url>
   <caption>AS_windowbear.jpg</caption>
   <width>318</width>
   <height>480</height>
</image>
<image>
   <url>flash/images/AS_rockingchair1.jpg</url>
   <caption>AS_rockingchair1.jpg</caption>
   <width>320</width>
   <height>480</height>
</image>
<image>
   <url>flash/images/AS_windowBW.jpg</url>
   <caption>AS_windowBW.jpg</caption>
   <width>320</width>
   <height>480</height>
</image>
<image>
   <url>flash/images/AS_dressBW.jpg</url>
   <caption>AS_dressBW.jpg</caption>
   <width>461</width>
   <height>760</height>
</image>
</gallery>

It still says "AutoViewer requires JavaScript and the Flash Player. Get Flash." in the table where autoviewer should play.

Re: embedding autoviewer to dreamweaver-HELP!

Can you put the gallery online so we can go look at it?

If not, can you post the entire html code?

Re: embedding autoviewer to dreamweaver-HELP!

I just restarted Dreamweaver and the changes were successful. Thank you for your help!