This tiny applet is meant to be 'hidden' on a webpage (give it a width and height of 1). There is no graphical part to it, but it may be used to play sound files when the user enters or exits a webpage (corresponing to the applet Starting and Stopping). Multiple sound files may be given to the applet, from which it will randomly pick one. Furthermore, the Enter Sounds may be looped continuously while the user has the webpage loaded. The example below plays one of two sounds upon starting (no loop), and a different sound when stopping.
The applet may be downloaded for free by clicking on the TAR-file link below (read the FAQ if you're not sure what to do with a TAR file). The FAQ also has step by step instructions on how to embed an applet into your own webpage.
Once unTARed, you should find the following classes (plus a '.jar' file if you want to use the archive= attribute in the <applet> tag):
Below are descriptions of all the parameters you may use to customize the applets to your webpages. Be sure to enclose any parameters that contain white space in double-quotation marks. Most parameters have default values in case you do not specify your own values, but the first two parameters (AUTHOR and COPYRIGHT) are necessary. If you are not sure how to incorporate an applet into a webpage (with its parameter names and values), looks at the source of this webpage and the applet embedded for an example, or read the FAQ page.
AUTHOR: This parameter must appear exactly as follows:
<param name=AUTHOR value="Eric Harshbarger, http://www.ericharshbarger.org">
COPYRIGHT: This parameter must appear exactly as follows:
<param name=COPYRIGHT value="AutoSound applet, Copyright 1999, Eric Harshbarger">
SOUNDS.ENTER: A list of sound files separated by spaces. When the webpage and applet load, the applet will randomly pick one of these sounds to play. Consult the FAQ about Java supported sound file formats.
SOUNDS.EXIT: A list of sound files separated by spaces. When the webpage is exited (and the applet stops), the applet will randomly pick one of these sounds to play. Consult the FAQ about Java supported sound file formats.
ENTER.LOOP: If 'true' then the sounds played when the webpage is entered (SOUNDS.ENTER) are looped continuously for as long as the user stays on that page. The sound will stop when the page is exited (though any exit sound may then be played). The default is 'false'.
The Applet Depot and all associated applets, text, scripts, and images, Copyright © 1998-2002 by Eric Harshbarger unless otherwise noted. 'Java' is a registered trademark of Sun Microsystems Incorporated.