Topic: multiple galleries following old post

Hi,

I know this topic has been touched other times, I'm trying to get several galleries on one page and I've followed the successful post of thetrillest for example, but without success. I'm not sure if it's because I have another js also going on or what, could you please have a look at it. This is gallery 1

<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 here.</a></div>
<script type="text/javascript">
var fo = new SWFObject("autoviewer.swf", "autoviewer", "800", "600", "8", "#181818");

                //Optional Configuration
        //fo.addVariable("langOpenImage", "Open Image in New Window");
        //fo.addVariable("langAbout", "About");
        
fo.addVariable("xmlURL", "gallery.xml");


fo.addParam("wmode", "transparent");
fo.write("flashcontent");
</script>

AND this is for gallery2.xml:

<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 here.</a></div>
<script type="text/javascript">
var fo = new SWFObject("autoviewer.swf", "autoviewer", "800", "600", "8", "#181818");

                //Optional Configuration
        //fo.addVariable("langOpenImage", "Open Image in New Window");
        //fo.addVariable("langAbout", "About");

fo.addVariable("xmlURL", "gallery2.xml");


fo.addParam("wmode", "transparent");
fo.write("flashcontent");
</script>

not only the second gallery is not showing up, but it's actually inverting and using gallery2.xml instead of gallery.xml in the first one

this is the url in case it helps:
http://emilianozelada.com/NEWsite-REwrite-auto2.html

thank you very much in advance for your help!

Re: multiple galleries following old post

You will need to ensure that each gallery is embedded into a div with a unique name and that each gallery's SWFObject has a unique variable name. Take a look at the following code and note the instances of 'fo1', 'fo2', 'flashcontent1' and 'flashcontent2'.
Also, you need only include the 'swfobject.js' file once on the page.

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

<div id="flashcontent1">AutoViewer requires JavaScript and the Flash Player.
<a href="http://www.macromedia.com/go/getflashplayer/">Get Flash here.</a></div>
<script type="text/javascript">
var fo1 = new SWFObject("autoviewer.swf", "autoviewer", "800", "600", "8", "#181818");

        //Optional Configuration
        //fo1.addVariable("langOpenImage", "Open Image in New Window");
        //fo1.addVariable("langAbout", "About");
        
fo1.addVariable("xmlURL", "gallery.xml");

fo1.addParam("wmode", "transparent");
fo1.write("flashcontent1");
</script>

<div id="flashcontent2">AutoViewer requires JavaScript and the Flash Player.
<a href="http://www.macromedia.com/go/getflashplayer/">Get Flash here.</a></div>
<script type="text/javascript">
var fo2 = new SWFObject("autoviewer.swf", "autoviewer", "800", "600", "8", "#181818");

        //Optional Configuration
        //fo2.addVariable("langOpenImage", "Open Image in New Window");
        //fo2.addVariable("langAbout", "About");

fo2.addVariable("xmlURL", "gallery2.xml");

fo2.addParam("wmode", "transparent");
fo2.write("flashcontent2");
</script>
Steven Speirs
SimpleViewer Support Team.