DavisTicker Examples

Here are some examples of how to use the included scrolling marque java applet "davisticker.class" in your own web pages. Below each example is an HTML code fragment you can copy. At the bottom of the page is a list of all the davisticker parameters.

The first example uses an external data file named "data.htm" in the same location as the web page:

HTML code used in this example:

<applet code="davisticker.class" width="650" Height= "40">
    <param name="dataFile" value="data.htm">
    <param name="fps" value="250">
    <param name="dataInterval" value="60">
    <param name="font" value="sans-serif">
    <param name="style" value="PLAIN">
    <param name="size" value="15">
    <param name="fontColor" value="255,000,051">
    <param name="borColor" value="153,000,051">
    <param name="borWidth" value="4">
    <param name="backColor" value="000,000,051">
</applet>


The next example specifies the text to scroll directly:

HTML code used in this example:

<applet code="davisticker.class" width="650" height= "60">
    <param name="string" value="Displays the text that you enter here">
    <param name="fps" value="100">
    <param name="font" value="courier">
    <param name="style" value="BOLD">
    <param name="size" value="20">
    <param name="fontColor" value="255,255,224">
    <param name="borColor" value="238,130,238">
    <param name="borWidth" value="8">
    <param name="backColor" value="030,145,255">
</applet>


Applet parameter list

The parameters can appear in any order in the HTML page. Parameter names are not case sensitive. If a parameter is not specified, the default value is used.

Parameter Name Parameter Description Default Value
width Specify the width in pixels of the ticker display. This is part of the <applet> Tag. 144
height Specify the height in pixels of the ticker display (including the border). This is part of the <applet> Tag. 144
codebase Specify the domain that the applet will run in, if it is different from the one that the web page is in. Java security restrictions require that the datafile used by the applet is in the same domain as the applet code. If you want to reference a data file that is in a different domain from the web page (for example to implement a shared message file), install the davisticker.code file on the same server as the message file and set codebase equal to the directory URL. This allows person X to view person Y's web page to view the ticker message generated by person Z.
This is part of the <applet> Tag.
Same as the Web Page containing the <applet> Tag.
dataFile Specify the path name of the data file that you want to display relative to the current web page or the codebase argument, if present. The file can be any file with ASCII text content. None
string The text to display if no dataFile is specified, or if dataFile can not be found. Blank message
dataInterval Sets the interval in seconds when the ticker looks for new data from the dataFile. This allows the message to be updated without refreshing the whole web page. The new message is used once the old message has scrolled completely off the display. Only applies if the dataFile parameter is used. 60
font Sets the text font. "Courier"
style Sets the font style. Valid values are: "PLAIN", "BOLD", or "ITALIC" "PLAIN"
size Sets the font size. 12
fps Sets the text scroll rate, roughly Frames Per Second.
10
borWidth Set the width in pixels of the border. 1
borColor Sets the color of the border. Specify a color by using decimal Red, Green, and Blue values between 0 and 255 separated by commas. Black
"0,0,0"
backColor Sets the color of the text background. Specify a color by using decimal Red, Green, and Blue values between 0 and 255 separated by commas. White
"255,255,255"
fontColor Sets the text color. Specify a color by using decimal Red, Green, and Blue values between 0 and 255 separated by commas. Black
"0,0,0"


Note on Scrolling Speed:

For fps rates greater than or equal to 200, the text will scroll by more than one pixel when it is updated.

The scrolling display will slow down by a factor of 3 when the mouse is on top of the applet. The ticker will resume normal speed when the mouse is taken off the applet.