Topic: button bar config
is there a way to have the image count appear in the button bar rather than the overlay?
You are not logged in. Please login or register.
SimpleViewer Forum → SimpleViewer-Pro v2 → button bar config
is there a way to have the image count appear in the button bar rather than the overlay?
It is not possible to display the image count on the Button Bar but you can determine the currently displayed image and the total number of images in the gallery using the SimpleViewer-Pro API (specifically, by using the getImageIndex() and getGalleryInfo() methods respectively) and then display this information elsewhere on your page. For example, try using the following code as your gallery's 'index.html' page.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var svAPI;
function svComplete() {
svAPI = document.getElementById('svInstance');
};
function svImageChange(index) {
var current = svAPI.getImageIndex()+1;
var info = svAPI.getGalleryInfo();
var count = info.imageCount;
document.getElementById("overlay").innerHTML="Currently displaying Image #" + current.toString() + " of " + count.toString() + ".";
}
var flashvars = {};
flashvars.galleryURL = "gallery.xml";
flashvars.enableAPI = "true";
var params = {};
params.allowfullscreen = true;
params.allowscriptaccess = "always";
params.bgcolor = "ffffff";
var attributes = {};
attributes.id = "svInstance";
attributes.name = "svInstance";
simpleviewer.ready(function() {
svAPI = simpleviewer.load('sv-container', '100%', '100%', 'transparent', true, flashvars, params, attributes);
});
</script>
<title>SimpleViewer-Pro Gallery</title>
</head>
<body>
<div id="sv-container"></div>
<div id="overlay" style="position: absolute; top: 10px; left: 10px; z-index: 999;"></div>
</body>
</html>
SimpleViewer Forum → SimpleViewer-Pro v2 → button bar config
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 5 official extensions. Copyright © 2003–2009 PunBB.