Tutorials

Using image flippers

This is the html code for the left applet below:
<APPLET code="JMSImage.class" archive="jms.jar" width=60 height=60>
<PARAM name="cabbase" value="jms.cab">
<PARAM name="name" value="left">
<PARAM name="image0" value="imageflipdot.gif">
<PARAM name="image1" value="imageflipright.gif">
<PARAM name="event0" value="right.mouse enter,1">
</APPLET>

This is the html code for the right applet below:
<APPLET code="JMSImage.class" archive="jms.jar" width=60 height=60>
<PARAM name="cabbase" value="jms.cab">
<PARAM name="name" value="right">
<PARAM name="image0" value="imageflipdot.gif">
<PARAM name="image1" value="imageflipleft.gif">
<PARAM name="event0" value="left.mouse enter,1">
</APPLET>

This is the image imageflipdot.gif:
imageflipdot.gif

This is the image imageflipright.gif:
imageflipright.gif

This is the image imageflipleft.gif:
imageflipleft.gif

Here two instances of the JMSImage are used. The 'image' parameters are used to load up to 100 images in the applet. 'image0' is always used as the default image. Here the default image is imageflipdot.gif. Next the 'event' parameters can be used to enter up to 100 events, followed by the target image seperated with a comma. A JMSImage produces the events 'mouse enter' and 'mouse exit'. By using the 'name' parameter you can give an applet a name. This allows to catch events from this applet with other applets. The "right.mouse enter,1" in the first applet does the following. Whenever the event 'mouse enter' occurs in the applet named 'right' image number 1, which is imageflipright.gif in this case, will be displayed.

VI - Combining the applets