Topic: longer time for first image

Is it possible to make the first image in slideviewer last longer ?   I'd like to make the first image a title photo (maybe 8 sec), before the rest of the images start playing (4 sec each).  Thanks!

Re: longer time for first image

Using the SimpleViewer-Pro API, you could use a setTimeout() when the gallery is ready (when the svComplete API event is fired) to set a delay, after which you could fire the toggleAutoPlay() API method.
Here is an example (starting AutoPlay after the initial image has been displayed for 4 seconds). To see it in action, create a sample gallery with svBuilder-Pro and replace the gallery's 'index.html' file with the code below.

<!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">
    <title>SimpleViewer-Pro Gallery</title>
</head>
<body>
    <script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
    <script type="text/javascript">
        var svAPI;

        function svComplete() {
            svAPI = document.getElementById('svInstance');
            setTimeout(function() {svAPI.toggleAutoPlay()}, 4000);
        };    

        var flashvars = {};
        flashvars.enableAPI = "true";
        showAutoPlayStatus = "false";

        var params = {};
        params.allowfullscreen = true;
        params.allowscriptaccess = "always";

        var attributes = {};
        attributes.id = "svInstance";
        attributes.name = "svInstance";

        simpleviewer.ready(function() {
            svAPI = simpleviewer.load('sv-container', '600', '400', '222222', true, flashvars, params, attributes);
        });
    </script>
    <div id="sv-container"></div>
</body>
</html>
Steven Speirs
SimpleViewer Support Team.

Re: longer time for first image

Thanks for working on it. I'm wondering if I'm doing something wrong, can't get it to change the time for the first image.

I tried pasting the code you gave instead of my html page and it doesn't seem to alter it. I then tried using your code in conjunction with my simpleviewer embed code ( I need 100% size and a few other constraints) My line with "jQuery document" has me wondering if that's the problem, I also need to get 8 sec on the first image, all the rest are set to 4 sec.
This is the simpleviewer embed I'm trying to use:

  <!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
<script type="text/javascript">        var svAPI;

        function svComplete() {
            svAPI = document.getElementById('svInstance');
            setTimeout(function() {svAPI.toggleAutoPlay()}, 8000);
        };   

        var flashvars = {};
        flashvars.enableAPI = "true";
        showAutoPlayStatus = "false";

        var params = {};
        params.allowfullscreen = true;
        params.allowscriptaccess = "always";

        var attributes = {};
        attributes.id = "svInstance";
        attributes.name = "svInstance";

jQuery(document).ready(function () {
SV.simpleviewer.load("sv-container", "100%", "100%", "transparent", true );
});
</script>
<div id="sv-container"><strong><font color="yellow">MISSING PLUG-IN </strong>- To see our slide show you need to install JavaScript and Flash Player. <a href="http://get.adobe.com/flashplayer/">Get Flash.</a></div>
<!-- END SIMPLEVIEWER EMBED -->

Re: longer time for first image

The problem with your code is that your simpleviewer.load line does not include the required flashvars, params and attributes variables.
Change:

SV.simpleviewer.load("sv-container", "100%", "100%", "transparent", true );

... to:

SV.simpleviewer.load("sv-container", "100%", "100%", "transparent", true, flashvars, params, attributes);

For more information on the Embed Code Parameters, please see here.

My line with "jQuery document" has me wondering if that's the problem

This is simply an older version of the recommended embedding code.
If you are using the current version of SimpleViewer-Pro (v2.3.1), then you can use the following:

simpleviewer.ready(function() {
    svAPI = simpleviewer.load('sv-container', '100%', '100%', 'transparent', true, flashvars, params, attributes);
});

If you are not using the current version of SimpleViewer-Pro, then you could upgrade by following the instructions on this web page.

(I checked the code before I posted it and it worked OK.)

Steven Speirs
SimpleViewer Support Team.

Re: longer time for first image

Thanks, I appreciate all the help on this!