The main goal of this example is to show how to use CustomSlider.class. For a listing of the attributes associated with the Custom Slider Widget, click on CustomSlider.class. This example uses a Custom Slider (BoatSlider) and a Linear Gauge (Fish). This whimsical custom slider uses a sail boat as its handle, with the channel image being a seascape. As the sail boat is moved, it is setting the value of InternalRAM byte variable #5. The linear gauge uses an image of an aquarium as the linear background image and a fish as its pointer. As the value of InternalRAM byte variable #5 increases, the fish ascends the aquarium and as the value decreases, the fish descends. Here is a snapshot of what the html page looks like in a "WYSIWYG" tool:

Figure 1.
To create a Custom Slider named BoatSlider that sets InternalRAM byte variable #5, the following is used:
<APPLET CODE="CustomSlider.class" WIDTH="197" HEIGHT="80"
NAME="BoatSlider">
<PARAM NAME="href" VALUE="Amulet:InternalRAM.byte(5).setValue()">
<PARAM NAME="hrefEvent" VALUE="onChange">
<PARAM NAME="min" VALUE="5">
<PARAM NAME="max" VALUE="22">
<PARAM NAME="minAt" VALUE="left">
<PARAM NAME="handleImage" VALUE="ship.gif">
<PARAM NAME="handleTrackingImage" VALUE="shipTr.gif">
<PARAM NAME="channelImage" VALUE="sea.gif">
<PARAM NAME="initialCondition" VALUE="10">
</APPLET>
To create a Linear Gauge named Fish that uses InternalRAM byte variable #5 as its input, Nemo.gif as its pointerImage and aquarium.gif as its linearImage, the following is used:
<APPLET CODE="LinearGauge.class" WIDTH="80" HEIGHT="175" NAME="LinGauge" >
<PARAM NAME="href" VALUE="Amulet:InternalRAM.byte(5).value()">
<PARAM NAME="min" VALUE="0">
<PARAM NAME="max" VALUE="25">
<PARAM NAME="minAt" VALUE="bottom">
<PARAM NAME="pointerImage" VALUE="Nemo.gif">
<PARAM NAME="backgroundImage" VALUE="aquarium.gif">
<PARAM NAME="updateRate" VALUE=".25,0.01">
</APPLET>
Notice that although the min and max for the Linear Gauge is 0 and 25, the minimum value it can possibly receive from the Custom Slider is 5 and the maximum value is 22. It wasn't desired to have the fish travel the full length of the aquarium, since we didn't want him in the sand or out of the water, so these limits were used.
NOTES: