Sound Effects

All sound effects are specified and loaded into the applet using the soundN parameter. There are two elements to this parameter Sound ID and Sound url. These two elements should be separated by a | character. Once a sound has been specified using this parameter it can be referred to within the other parameters simply by the Sound ID.

Please Note: Java Applets require that sound files are in Audio format ( .au files ).

The sound parameter names must be a continuous sequence starting with 1. So if you have 4 audio files then you would have the following 4parameters,

<param name="sound1" value="bgsound|./sounds/harp.au">
<param name="sound2" value="open|./sounds/warp.au">
<param name="sound3" value="close|./sounds/hit.au">
<param name="sound4" value="click|./sounds/targeted.au">

Example

For example lets suppose you have an audio file "harp.au" in a subdirectory of "sounds" that you wish to refer to as "bgsound", the sound parameter would be,

<param name="sound1" value="bgsound|./sounds/harp.au">

Notice that in this example a relative url is used, an absolute url may also be specified

e.g. <param name="sound1" value="bgsound|http://www.jpowered.com/sounds/harp.au">

Default

There are no default values for this parameter. The applet will attempt to read the sound1 parameter and then sound2 etc. This will continue until the soundN parameter is not found. It is therefore essential that name numbering is continuous.
If there is an error whilst trying to load the audio file from the supplied url then the current parameter will be skipped and no entry will be made in the sound list.