First some examples. The second TickerTape working above makes use of most of the default settings and specifies its text through the text parameter. It has an HTML applet tag that looks like:
<applet code="VietTicker" width=320 height=41 align=absmiddle>
<param name=text value="Lþi ði¬m cüa ticker java này là chúng ta không c¥n phäi
gài fonts tiªng Vi®t · server và clients không c¥n phäi có fonts tiªng
Vi®t m¾i ð÷c ðßþc
">
<font size=-1>[You will need a Java capable browser to view this applet]</font>
</applet>
Note that the above text is in VISCII format.The first TickerTape above makes use of more of the parameters and reads its text from a file on the server. It has an HTML applet tag that looks like:
<applet code="VietTicker" width=440 height=69 align=absmiddle> <param name=file value="java/ticker/vn.txt"> <param name=speed value=90> <param name=ledcolor value=yellow> <param name=backcolor value=black> <param name=framecolor value=darkgray> <param name=ledoffcolor value=darkgray> <param name=framethick value=2> <param name=ledsize value=4> <param name=ledtype value=1> <font size=-1>[You will need a Java capable browser to view this applet]</font> </applet>The following subsections detail each of the parameters used to define the TickerTape behaviour:
Text can either be entered at the parameter line or via a file reference. If both are specified the TEXT parameter takes precidence (as in the following example). The file specifies a file that is relative to the document in which the applet is displayed.
<param name=text value="Lþi ði¬m cüa ticker java này là ..."> <param name=file value="java/ticker/vn.txt">Note that the text and file include VISCII-encoded characters. There are several utilities to convert VIQR to VISCII formats. Please refer to Trichlor's home page for VISCII-related utilities
Values accepted are the prime colors that the Java language uses: black, blue, cyan, darkgray, gray, green, lightgray, magenta, orange, pink, red, white, and yellow, or you can specify an absolute hex tripplet (Red Green Blue) as you would in HTML coding. You can currently set the colors of the background, the frame and the text on and off colors as follows (in the same order and with default values shown):
<param name=backcolor value="black"> <param name=framecolor value="green"> <param name=ledcolor value=#ffcd88> <param name=ledoffcolor value="darkgray">
You have control over the height and width of the display as well as the thickness of the frame and size and spacing of the "LEDs" (the units that make up each dot in a character).
The applet width is flexible, however it is up to you to set an appropriate height value. The value for height should be more than: 11 x (the LED size + the LED spacing) + 2 x the frame thickness + 2. So for the default frame thickness of 1 and LED size of 2 and spacing of 1 a minimum height value would be 11 x 3 + 2 + 2 = 37.
height and width are the parameter you specify in the <applet> tag. You can set the frame thickness and LED appearance as follows (default values shown):
<param name=framethick value=1> <param name=ledsize value=1> <param name=ledtype value=0> <param name=ledspacing value=1>
The ledtype corresponds to the shape, either square or circular. Square LEDs have ledtype of 0 and circular are ledtype 1. ledspacing is the pixel distance between LEDs - typically a value of 1 or 2 presents a good appearance.
There are two ways you can control the speed. One defines the scrolling time interval in millseconds, the other defines how far each scroll interval moves the text (default values shown):
<param name=speed value=100> <param name=scrollfactor value=2>
<param name=text value="...">is not working properly on the MacIntosh. The work around for Mac users for now is to use file value instead of text value, i.e.
<param name=file value="filename.txt" >