SimpleViewer 1.9 - Frequently Asked Questions:
First check here to determine the version of Flash you have installed. If you have Flash 8 or higher installed and you still see the message:
- Check you have uploaded the 'swfobject.js' file in your simpleviewer gallery folder.
- Make sure you are using the latest version of SimpleViewer.
2: When I view my gallery in Internet Explorer, the gallery does not function, or I see the message 'Click to activate and use this control'.
This issue affects older versions of SimpleViewer. Make sure you are using the latest version of SimpleViewer.
3: My images do not show in SimpleViewer. What are possible problems?
Make sure your jpgs are saved as "non-progressive". Check your image editing software's documentation for how to do this.
4. My images show locally, but not when I upload them to my webserver. What are possible problems?
Check your image paths and filenames exactly match the names specified in the XML file. Most servers are Case Sensitive. This means the letter cases in the filename must exactly match those in the XML document (for example ".jpg" is not the same as ".JPG").
Another possible problem is if your webserver has 'Hotlink Protection' enabled. Hotlink Protection breaks SimpleViewer. Check with your webserver administrator.
Yet another possible problem is if you are using 'Fetch' to upload your files. Older versions of Fetch break SWFs on upload. Upgrade Fetch or use a different FTP app.
5: When I update my images, the new images do not show up in SimpleViewer. Why?
You may be looking at a cached version of gallery.xml. Browsers will save previously viewed versions of files on the web for faster loading. To avoid this, you can clear your browser cache after making updates. To clear the cache in Internet Explorer go to Tools -> Internet Options -> Delete Files, or press Ctrl-F5 to reload the page without caching.
Visitors to your gallery will almost always see the latest version of your gallery. Most browsers check for newer versions of files on each browser session. Browser caching happens for all websites, so this issue applies to all files on the web.
6: Non-English characters are not showing in the captions. Why?
To allow non-English characters to show, you must save your XML document with 'UTF-8' encoding (in Windows Notepad you can set this is the 'Save As' dialog). Check the documentation for your text editor.
7: My images appear smaller than the originals, or image quality is reduced. Why?
SimpleViewer will scale down images to fit in the browser window. This is to allow the whole user-interface to appear in the browser without scrolling. Down-scaled images may appear to be lower quality than the original. To avoid this, either make your images smaller, or increase the size of your browser window. Also, check your maxImageWidth and maxImageHeight value matches the width and height of your largest image (in pixels). You may also give your gallery a fixed width and height (see Question 10).
8. I created a gallery with 300 images. When I view this gallery, my computer slows down or freezes.
SimpleViewer is designed for viewing at most around 50 images per gallery. More images than this can cause slow performance on older machines, as all the images are loaded into memory simultaneously. Try splitting your gallery into multiple sub-galleries (check Q16).
9: Can I add a menu or back button to SimpleViewer?
Yes. You can add any HTML page elements such as a back button, menu or logo by editing index.htm. Take a look at this example page. The example page gives SimpleViewer a fixed height and allows for a page header and footer. To use this example, save the HTML file to your local SimpleViewer folder.
10: Can I give SimpleViewer a fixed width or height?
Yes. Edit index.html to place viewer.swf inside a div or table cell. Give the div or table a fixed height and width in pixels. Take a look at this example page. The example page gives SimpleViewer a fixed height and allows for a page header and footer.
11. How do I insert SimpleViewer into a pre-existing HTML page?
View Instructions and an example of how to embed SimpleViewer into an existing HTML document.
12. How can I add a vertical scrollbar to my SimpleViewer gallery ?
Remove this line from index.html:
13. I want to my users to be able to save my images. How can I do this?
Users can open images in a new window by right-clicking on the image, if you set the optional enableRightClickOpen value in gallery.xml. See all config options here.
You can also add text links in the image captions to open up the jpg in a new window. This will allow users to right-click the image and save it. To add a HTML link in the comments, use something like the following:
<caption><![CDATA[ <A href="images/DSC_0696.jpg" target="_blank"><U>Open image in new window</U></A> ]]></caption>
Alternatively, if you are using buildGallery.php, you can automatically generate
download links by editing the script and setting $showDownloadLinks = true.
14: Can I add HTML formatting to my captions?
Yes. Caption text can include a limited set of HTML formatting, including hyperlinks, line breaks, font tags, bold, underline and italics. Click here to view a list of HTML tags supported by Flash. You must wrap HTML formatted text inside a CDATA tag as below:
<caption><![CDATA[ <font face="Times" size="20" color="#ffff00">Big times text </font><b>bold text</b><u><a href="index.html">link text</a> </u><br>New line of text ]]></caption>
15. Can I add HTML formatting to the Title text?
Yes. Title text can include a limited set of HTML formatting, including hyperlinks, line breaks, font tags, bold, underline and italics. When adding HTML formatting to the title attribute in gallery.xml, you must replace the following special characters with their XML escape sequence:
|< (Left angle bracket)||<|
|> (Right angle bracket)||>|
|" (Straight quotation mark)||"|
So to add a large Times-Roman title use:
title="<font face="Times" size="20" >Big Times Title</font>"
16: How do I create multiple galleries?
To create multiple SimpleViewer galleries, make a copy of the whole SimpleViewer gallery folder for each gallery. Create your individual galleries as normal. You can now create a menu page that links to the index.html page in each sub-folder. Here is an example that contains a menu to navigate between 2 SimpleViewer galleries.
You can also embed 2 galleries on one HTML page, view the example here. When you do this, ensure you give each viewer a different div id.
SimpleViewer-Pro allows you to load multiple galleries into one container Flash movie. Check the multiple_galleries.fla example in the Pro download folder.
17. Can I reduce the spacing around the main image?
SimpleViewer will automatically adjust it's layout to try to best fit the available space. Here is an example of a gallery where image is flush to the edge of the swf. the If you have a fixed sized SWF and you want the large image to be flush to the edge of the SWF, there are a couple of things to try:
- Set the stagePadding XML Option to 0.
- Check the maxImageWidth and maxImageHeight XML options match the width and height of your images.
- Use the vAlign and hAlign XML options to set the position of the gallery within the SWF.
- Set the height and width of the SWF in the HTML doc so that the image is flush with the edge. View an example here.
Another option is to use SimpleViewer-Pro, and used the fixed layout option.This allows you to exactly specify the postions of the gallery elements
18. How do I set the background color?
Edit index.html. Enter the hex color value as the last parameter in the SWFObject code line:
var fo = new SWFObject("viewer.swf", "viewer", "100%", "100%", "8", "#FF00FF");
19. Can I add a background image to my gallery?
Yes. Use the backgroundImagePath XML Option to specify a relative or absolute path to a JPG or SWF to load as the gallery background. Relative paths are relative to the HTML document that contains SimpleViewer.
For example, to add a background image called 'back.jpg', copy the image to your gallery folder and add this at the top of gallery.xml:
backgroundImagePath = "back.jpg"
20. Can I load the XML data from a different file location than the default? Can I load my images and thumbs from different folders than the default?
Automatic Gallery Generation Issues
21. When I run buildgallery.php, my thumbnails are not created. Why not?
Some servers have the imagecopyresampled function disabled. This can cause thumbnails to not be created. To fix this, edit buildgallery.php. In the gallery options, set useCopyResized = true;
22. Using buildgallery.php, how can I sort my images by filename or in forward date order?
By default buildgallery.php sorts images in reverse date order. To change sort options, edit buildgallery.php. In the gallery options, set sortByDate and sortInReverseOrder as required
23: Will SimpleViewer load things other than JPG images?
SimpleViewer can load JPG, GIFs, PNGs and SWFs. Any other file types (TXT, FLVs etc) are not supported.
SWFs are loaded in the same way as JPGs, just add the SWF filename to gallery.xml. Note that you will need to add a thumbnail SWF with the same name as the large SWF in the 'thumbs' folder (create a separate SWF that displays a thumbnail preview). Note that SWFs that use complex ActionScripting may not work as expected when loaded into SimpleViewer.
24: How can I upgrade my existing galeries to version 1.9 without re-building them?
To convert an existing gallery from v1.8 to v1.9 simply replace the 'viewer.swf' in the gallery folder.
25: Can I add a SimpleViewer gallery to a MySpace page?
Yes. Click here for an example. To add a gallery to a MySpace page, do the following:
- First, you will need to host your gallery files (including images) on a webserver somewhere (in this example: http://www.mywebsite/mygallery/).
- In your gallery.xml file, specify absolute URLs to your image and thumbnails folders. Also move the thumbnails below the image. Check the example gallery.xml here.
- Add the following code to your myspace page. Enter the URLS to your viewer.swf and gallery.xml files:
<embed src="http://www.mywebsite/mygallery/viewer.swf" FlashVars="xmlDataPath=http://www.mywebsite/mygallery/gallery.xml" bgcolor=#000000 WIDTH=420 HEIGHT=520 TYPE="application/x-shockwave-flash"></embed>
26: How do I change the color of the navigation arrows?
Set the frameColor value in the XML options
27: How do I display SimpleViewer under other elements on my HTML page, for example a drop-down menu?
You can have the SimpleViewer SWF appear under DHTML layers by adding this code under the SWFObject line in the HTML document. Note this may cause issues with certain browsers.
28: Why do my image colors look faded when viewed in SimpleViewer?
Image colors may appear faded or washed-out when viewed in SimpleViewer. This is caused by the fact that Flash does not handle color profiles. To make the image look the same in Flash and Safari save your images using the 'sRGB' color profile. In PhotoShop, use 'Save for Web'. Uncheck 'Embed Color Profile' and check 'Convert to sRGB'. Note that many browsers (including Internet Explorer) do not handle color profiles, so it is always best to convert to sRGB when saving images for the web.
29: How do I disable right-click 'Open Image in New Window'
To disable this feature, set enableRightClickOpen to false in the XML options.
30. Can I run 2 instances on SimpleViewer on the same HTML page?
Yes. Check the example plus downloadable files here.
31. How can I set the preloader color?
Use the preloaderColor HTML Option
32. How do I give SimpleViewer a transparent background?
You can give SimpleViewer a transparent background, but it's not recommended. Transparent SWFs may exhibit issues with certain browsers. Where possible, it's better to load in a background image. Check Q19 above. To make your gallery transparent, add this code under the SWFObject line in the HTML document:
33. Can I link Directly to a specfic image in a gallery?
34. How can I get my images flush to the edge of the swf?
Use the vAlign, hAlign and navPostion XML options to position the gallery elements within the SWF. Set stagePadding to zero. Set maxImageWidth and maxImageHeight to match your image dimensions.
35. When I view my gallery in Firefox it gets cropped to a small height. Why?
Check your CSS. Firefox requires that you explicitly set the height of the 'html' and 'body' tags, plus the div that contains SimpleViewer. Try setting them all to '100%' or the height you require in pixels. For an example, check the CSS in the 'index.html' file that comes in the SimpleViewer download.
36. When I view my gallery I see the message 'Gallery Not Found'. How do I fix this?
'Gallery Not Found' means the SimpleViewer SWF cannot find the 'gallery.xml' file that describes the gallery. Make sure the gallery.xml file is in the same folder as the SimpleViewer SWF and the HTML document that contains the SWF.