Title:   tinySlideShow
Author:  Christian Ricci, One Wolf WebArt
Email:   chris@onewolf.com

Notice:  This applet and the rest of the tinyApplet series are free for
         both commercial and personal use.  You may not, however,
         redistribute this applet or its associated material as part of
         a CD or book without the express written permission of the 
         author.

Introduction
------------

TinySlideShow is an enhanced version of tinyImageCycle.  However,
tinySlideShow is better suited to situations where there are quite a
few images (as many as 5000).  TSS features a customizable button
bar, background graphic, delay, optional "loading" indicator,
audible feedback, and so on.

To best determine how to set up tinySlideShow, the following 
conventions should be understand and used:

 o  Image filenames should have a format such as:
    [prefix][index].[type], where the prefix is consistent text
    string, the index is a consecutive set of numbers and the 
    image type is either CompuServe GIF or JPEG (JPG).

    Example:  img0001.gif or img1.gif

Parameters
----------

FILEPREFIX (Required) - Pass the FILEPREFIX, including any path
information.  For example, if all of the files have the format
img####.gif where #### is the index number (ie. 0001 - 0100), the
FILEPREFIX would be "img".  Or, if the image files are all stored in 
a subdirectory called img and have the same naming convention, the 
FILEPREFIX would be "img/img".

FILETYPE (Required) - FILETYPE could also be referred to as the 
extension.  Include the period separator.  For example if all of the
images are CompuServe GIF format, the FILETYPE would be ".gif".

FILELENGTH (Optional) - FILELENGTH is a required parameter if the 
index value in the filename is zero-padded.  That is, if your images
have the format img####.gif and #### looks like 0002 (=2), 0100 
(=100), etc., pass the FILELENGTH parameter (7 in the above example)
without including the extension characters or period.  

MININDEX (Required) - MININDEX is the lowest image file index value.

MAXINDEX (Required) - MAXINDEX is the highest image file index 
value.

STARTINDEX (Optional) - If the first image shown is not the MININDEX,
pass the starting index value in this parameter.  

BGRED, BGGREEN, BGBLUE (Optional) - You may set the background color
of the applet by passing the one byte (0-255) RGB (Red, Green and
Blue) component values. The background color defaults to black.

FGRED, FGGREEN, FGBLUE (Optional) - You may set the foreground (font)
color for the applet by passing the one byte (0-255) RGB (Red, Green
and Blue) component values. The foreground color defaults to white.

FONTNAME and FONTSIZE (Optional) - You may force the font type and
size for the loading string by passing these values. If you pass one, 
you'll need to pass both.  Fontname and size are client-system dependent.

LOADFLAG (Optional) - Passing a "Y" in the LOADFLAG parameter turns 
on an indicator that will appear while the applet is loading the next
image.  The indicator (Load String), will appear at the X, and Y 
positions passed as parameters.  LOADFLAG defaults to "N" (off).

LOADSTRING (Optional) - If you want to pass a custom Load String, it
is passed in this parameter.  This is the indicator that appears if
LOADFLAG = "Y".  LOADSTRING defaults to "Loading...".

LOADINGX and LOADINGY (Optional) - The LOADSTRING, above, is printed
in the applet at the X and Y coordinates passed in these parameters. 
The default position is at (or near) the center of the image space in
the applet.

BUTTONBARON and BUTTONBAROFF (required/optional) - BUTTONBARON is a 
required parameter.  This is the image used for the button bar at the
bottom of the screen.  BUTTONBAROFF is an optional image used when
the slideshow has been paused (see example).  Both button bars should 
be exactly the width of the applet; the button bar height is passed in
BUTTONBARHEIGHT, below.

BUTTONBARHEIGHT (optional) - If the button bar height is not 20 
pixels, pass the height in pixels in this parameter.  The image will 
be centered in the remaining space of the applet.  BUTTONBARHEIGHT
defaults to 20 pixels.

BG (optional) - A custom background graphic can be passed in this 
parameter.  The background graphic will fill the applet space not 
populated by the button bar, behind the image.

SOUND (Optional) - If you'd like audible feedback for when the user
clicks on the button bar, pass the audio file in this parameter.  The
sound file needs to be an AU (Sun) format.  I'd recommend not using
this feature since abnormally shutting down the applet (JVM) may 
result in the user losing their sound capabilities.

DELAY (Optional) - Delay controls the time interval, in milliseconds,
between changes in the image.  Delay defaults to 5000 milliseconds (5
seconds).

MODE (Optional) - By default, the applet loads each image prior to
being displayed.  After the image is displayed, and before the next one
is loaded, the image is flushed from memory.  This prevents the applet
from filling memory (and allows you to display thousands of images).  
However, it slows down the applet and forces each image to be loaded
over again.  If you're using a relatively small number of images, by 
passing "PRELOAD" (or "preload") in the MODE parameter, you can force
the applet to preload all images and display them from memory.

Example 1
---------

    <applet code="tinySlideShow.class" height="150" width="200">
    <param  name="FILEPREFIX" VALUE="img/img">
    <param  name="FILETYPE" VALUE=".gif">
    <param  name="BUTTONBARON" value="buttonbar200_on.gif">
    <param  name="BUTTONBAROFF" value="buttonbar200_off.gif">
    <param  name="BG" value="techbg.gif">
    <param  name="MININDEX" value="1">
    <param  name="MAXINDEX" value="5">
    </applet>

In this example, the applet is 150 pixels high and 200 pixels wide.
There are 5 image files are stored in a subdirectory (img) with 
".gif" extensions:

img1.gif
img2.gif
img3.gif
img4.gif
img5.gif

There are two button bar graphics, one for when the slide show is
running and one for when the slideshow is paused.  And lastly, 
there is a background image called "techbg.gif"

Example 2
---------

    <applet code="tinySlideShow.class" height="150" width="200">
    <param  name="FILEPREFIX" VALUE="img">
    <param  name="FILETYPE" VALUE=".jpg">
    <param  name="BUTTONBARON" value="buttonbar200_on.gif">
    <param  name="BGRED" value="0">
    <param  name="BGGREEN" value="0">
    <param  name="BGBLUE" value="255">
    <param  name="FILELENGTH" value="7">
    <param  name="MININDEX" value="1">
    <param  name="MAXINDEX" value="4000">
    <param  name="SOUND" value="click.au">
    </applet>

In this example, the applet is the same height, with a blue back-
ground and one button bar (the same for running and paused).
However, the files are loaded from the same directory and have a
zero-padded index value:

img0001.jpg
img0002.jpg

...

img3999.jpg
img4000.jpg

In addition, there is an audio file played when the user clicks on
the button bar.  The sound is loaded from the "click.au" sound 
file.