JAVA     

KzmFortune

Created: 30.Nov.95

KzmFortune Applet
    * Description
KzmFortune is based on my previous KzmScroll. In fact it prints a moving message (from right to left) on the screen in a colored rectangle. The only difference is that the message is randomly readed from a text file (located in the same directory of the .html file).      
    * Parameters
Font (string, default="Helvetica")
The name of the font. Unfortunately this parameters could be "dangerous" if you use a font that is not present in all system. So, be careful in using it.
FontSize (int, default=12)
The size of the font
FontBold (0|1, default=1)
If this parameter is 0 the font is plain, if it is 1 the font is bold.
Rectangle (X Y W H, default=size of applet)
The size of the scrollable area.
Shift (int, default=5)
This is the shifting of the message.
Delay (int, default=50)
The delay (in milliseconds) between every shift.
Rect_Color (R G B, default=0 0 0)
The color of the scrollable area (the rectangle).
Text_Color (R G B, default=255 255 255)
The color of the scrolling text.
FileName (string, default=fortune.txt)
The file that contains the different messages. If the file is unreadable, the applet will not work. Click
here to see the filename for the example above.
FileLines (int)
The number of lines in the fortune file. Every fortune is 1 line. If this number is wrong, the message could be "NO FORTUNE".
Copyright (string)
This is a simple copyright line. Please, don't change it. The applet is free, so the only cost is to leave this copyright.
     
    * Download
KzmFortune.zip      
    * Example
Here is the tag used for the example above:
<APPLET CODE="KzmFortune" WIDTH="350" HEIGHT="20">
 <PARAM NAME="copyright"
        VALUE="Alex 'Kazuma' Garbagnati, kazuma@energy.it"
 <PARAM NAME="font" VALUE="Helvetica">
 <PARAM NAME="fontbold" VALUE="0">
 <PARAM NAME="fontsize" VALUE="14">
 <PARAM NAME="shift" VALUE="2">
 <PARAM NAME="delay" VALUE="50">
 <PARAM NAME="rectangle" VALUE="0 0 350 20">
 <PARAM NAME="filename" VALUE="fortune.txt">
 <PARAM NAME="filelines" VALUE="5">
 <PARAM NAME="rect_color" VALUE="0 0 128">
 <PARAM NAME="text_color" VALUE="0 255 255">
</APPLET>