Topic: Problem enbedding viewer in html

Hello all,

I have multiple galleries then I have multiple html pages : landscape.html, portrait.html... in my website root. These html page contain my logo and they have to load the right gallery. Each galleries are in a folder : landscape, portrait... (these galleries was generated by SV photoshop plugin).

I'm really bad with html, then I've copy/paste this code in my landscape page:

<div id="flashcontent">SimpleViewer requires Macromedia Flash. <a href="http://www.macromedia.com/go/getflashplayer/">Get Macromedia Flash.</a> If you have Flash installed, <a href="index.html?detectflash=false">click to view gallery</a>.
        </div>    
        <script type="text/javascript">
            var fo = new SWFObject("http://www.mywebpage.com/landscape/viewer.swf", "viewer", "800", "600", "8", "#181818");    
            fo.addVariable("xmlDataPath", "http://www.mywebpage.com/landscape/gallery.xml");
            fo.write("flashcontent");    
        </script>

BUT, the only thing that I get is the webpage with my logo following by:

"SimpleViewer requires Macromedia Flash. Get Macromedia Flash. If you have Flash installed, click to view gallery. "

What is wrong? I don't understand...

In advance, THANKS A LOT!

P.S: For information, I give you all the html code, if you see something strange (I use incomedia to generate the original code):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
    <title>landscape</title>

    <!-- Contents -->
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <meta http-equiv="Content-Language" content="en" />
    <meta http-equiv="last-modified" content="07.11.2009 10:20:47" />
    <meta http-equiv="Content-Type-Script" content="text/javascript" />
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <!-- imCustomHead -->
    <meta http-equiv="Expires" content="0" />
    <meta name="Resource-Type" content="document" />
    <meta name="Distribution" content="global" />
    <meta name="Robots" content="index, follow" />
    <meta name="Revisit-After" content="21 days" />
    <meta name="Rating" content="general" />
    <!-- Others -->
    <meta name="Generator" content="Incomedia WebSite X5 Evolution 8.0.11 - www.websitex5.com" />
    <meta http-equiv="ImageToolbar" content="False" />
    <meta name="MSSmartTagsPreventParsing" content="True" />
    
    <!-- Parent -->
    <link rel="sitemap" href="imsitemap.html" title="General Site Map" />
    <!-- Res -->
    <script type="text/javascript" src="res/x5engine.js"></script>
    <link rel="stylesheet" type="text/css" href="res/styles.css" media="screen, print" />
    <link rel="stylesheet" type="text/css" href="res/template.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="res/print.css" media="print" />
    <!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="res/iebehavior.css" media="screen" /><![endif]-->
    <link rel="stylesheet" type="text/css" href="res/p001.css" media="screen, print" />
    <link rel="stylesheet" type="text/css" href="res/handheld.css" media="handheld" />
    <link rel="alternate stylesheet" title="High contrast - Accessibility" type="text/css" href="res/accessibility.css" media="screen" />

</head>
<body>
<div id="imSite">
<div id="imHeader">
    
    <h1></h1>
</div>
<div class="imInvisible">
<hr />
<a href="#imGoToCont" title="Skip the main menu">Go to content</a>
</div>
<div id="imBody">
    <div id="imMenuMain">

<!-- Menu START -->
<a name="imGoToMenu"></a><p class="imInvisible">Main menu:</p>
<div id="imMnMn">
<ul>
    <li><a href="index.html" title="">Home Page</a></li>
    <li><a href="wildlife.html" title="">wildlife</a></li>
    <li><a href="landscape.html" title="">landscape</a></li>
</ul>
</div>
<!-- Menu END -->

    </div>
<hr class="imInvisible" />
<a name="imGoToCont"></a>
    <div id="imContent">

<!-- Page START -->
<h2>landscape</h2>
<div id="imPage">
 
  <div id="flashcontent">SimpleViewer requires Macromedia Flash. <a href="http://www.macromedia.com/go/getflashplayer/">Get Macromedia Flash.</a> If you have Flash installed, <a href="index.html?detectflash=false">click to view gallery</a>.
        </div>    
        <script type="text/javascript">
            var fo = new SWFObject("http://www.mywebpage.com/landscape/viewer.swf", "viewer", "700", "700", "8", "#181818");    
            fo.addVariable("xmlDataPath", "http://www.mywebpage.com/landscape/gallery.xml");
            fo.write("flashcontent");    
        </script>

  
</div>
<!-- Page END -->


    </div>
    <div id="imFooter">
    </div>
</div>
</div>
<div class="imInvisible">
<hr />
<a href="#imGoToCont" title="Read this page again">Back to content</a> | <a href="#imGoToMenu" title="Read this site again">Back to main menu</a>
</div>


<div id="imShowBoxBG" style="display: none;" onclick="imShowBoxHide()"></div>
<div id="imShowBoxContainer" style="display: none;" onclick="imShowBoxHide()"><div id="imShowBox" style="height: 200px; width: 200px;"></div></div>
<div id="imBGSound"></div>
<div id="imToolTip"><script type="text/javascript">var imt = new IMTip;</script></div>
</body>
</html>

Re: Problem enbedding viewer in html

Looks like you are missing <script type="text/javascript" src="swfobject.js"></script>

Mike Richards
SimpleViewer Support Team.

Re: Problem enbedding viewer in html

Hi Miker,

Thank you for your answer.

Sorry for this question but I'm dont know html: Where I have to put this line in my landscape.html.

I tried to put this on the html code instead of this line:

 ***<script type="text/javascript">*** <---- this line!!!
            var fo = new SWFObject("http://www.mywebpage.com/landscape/viewer.swf", "viewer", "700", "700", "8", "#181818");    
            fo.addVariable("xmlDataPath", "http://www.mywebpage.com/landscape/gallery.xml");
            fo.write("flashcontent");    
        </script>

And I get this:

SimpleViewer requires Macromedia Flash. Get Macromedia Flash. If you have Flash installed, click to view gallery.
var fo = new SWFObject("http://www.mywebpage.com/landscape/viewer.swf", "viewer", "700", "700", "8", "#181818"); fo.addVariable("xmlDataPath", "http://www.mywebpage.com/landscape/gallery.xml"); fo.write("flashcontent");

Last edited by DoctorNed (2009-11-07 20:18:14)

Re: Problem enbedding viewer in html

It should either go inside your head tag or before the <div id="flashcontent">

Mike Richards
SimpleViewer Support Team.

Re: Problem enbedding viewer in html

It works.... but I can see the frame and the thumbnails frames but no gallery, I can see also the name of the pics and the gallery name, then the gallery.xml seams to be loaded....

The problem must be in gallery.xml.

My landscape.html is on the root of my website. It must load the gallery from a folder called landscape who contain: folders image/thumbs, gallery.xml, swfobject.js, viewer.swf

Thank you in advance for your help!!!


P.S:Here is the .xml from landscape:

<?xml version="1.0" encoding="UTF-8"?>
<simpleviewerGallery maxImageWidth="600" maxImageHeight="600" textColor="0xffffff" frameColor="0xffffff" frameWidth="5" stagePadding="40" navPadding="40" thumbnailColumns="8" thumbnailRows="1" navPosition="bottom" vAlign="center" hAlign="center" title="Landscape" enableRightClickOpen="false" backgroundImagePath="" imagePath="" thumbPath="">
<image>
    <filename>Antelope+Monument 026.jpg</filename>
    <caption>Antelope+Monument 026.jpg</caption>
</image>
<image>
    <filename>Antelope+Monument 114.jpg</filename>
    <caption>Antelope+Monument 114.jpg</caption>
</image>
<image>
    <filename>Egypte-Pyramides-Mosquée Moahmed Ali 017.jpg</filename>
    <caption>Egypte-Pyramides-Mosquée Moahmed Ali 017.jpg</caption>
</image>
<image>
    <filename>Egypte-Pyramides-Mosquée Moahmed Ali 052.jpg</filename>
    <caption>Egypte-Pyramides-Mosquée Moahmed Ali 052.jpg</caption>
</image>
<image>
    <filename>Golden Gate 002.jpg</filename>
    <caption>Golden Gate 002.jpg</caption>
</image>
</simpleviewerGallery>

Last edited by DoctorNed (2009-11-08 02:54:00)

Re: Problem enbedding viewer in html

I think that I need to specify the path for the images and the thumbs in gallery.xml?

If it's the case, can you tell me how to do?

Thank you !

Re: Problem enbedding viewer in html

In your gallery.xml use imagePath and thumbPath more details can be found here.

Mike Richards
SimpleViewer Support Team.

Re: Problem enbedding viewer in html

My paths was badly specified, now it works like a charm!

Thank you very much miker, you are the best!!! wink