pplet
-
ScrollingUpdateApplet (Version 1.1) ScrollingUpdateApplet is an applet and a canvas class that can be used to vertically scroll text over a static background image. The text is read from a file on the host, and the host text file is subsequently read periodically for updates. If an update to the text file occurs, then the vertically scrolling text displayed by the applet is dynamically updated. | ||||||||||||||||||||||||||||||||||||||||||||||
peration The following documentation describes how the ScrollingUpdateApplet class is used. You can also use the ScrollingUpdate canvas class if you wish to integrate vertically scrolling text with dynamic update capabilites in your own application or applet. The ScrollingUpdate class is documented separately. ScrollingUpdateApplet.class (the applet) requires ScrollingUpdate.class (the canvas), which in turn requires NetworkTextFile.class. All of these objects are included in the download package. During initialization, ScrollingUpdateApplet loads the GIF or JPEG image that will be used as the background image, and reads a specified file on the host to retrieve the text that is to be scrolled vertically over the image. The are a number of parameters (documented below) that control how the text will be rendered over the background. Both the font characteristics and the location of the scroll region within the background image can be specified. The number of words that appear on a single line in the scroll region is automatically determined based upon the font characteristics and the width of the scroll region. Because each line of text is automatically formatted, the text entered in the text file does not need to be manually formatted with carriage returns. If you wish to create a line break in the text, enter the <BR> code or the <P>
code in the text file where the line break should be placed. The code should be
entered on a single line or with a least one space on either side of the code.
The <BR> code will place a line break in the text at
the location of the code. The <P> code will insert a
blank line in addition to inserting the line break.The frequency at which the applet checks for changes to the text file can be specified, as well as whether or not a notification indicator should be displayed whenever an update check occurs. The applet determines if the text file has been changed by reading the very first line of text in the file (the file header) and comparing it to the header that was read on the previous read. Note that the header is never displayed, so the header line in the file can be can be anything that you wish, such as the date and time that the file was last changed. When you want to indicate that the text in the file has changed, simply modify the header and save the file. The next time that the applet checks the text file, it will find that the header has changed and will then reload and re-render the text to be scrolled. Scrolling text can be paused by clicking anywhere within the boundries of the applet. A second click will start the text scrolling once again. | ||||||||||||||||||||||||||||||||||||||||||||||
ample
| ||||||||||||||||||||||||||||||||||||||||||||||
arameters Following are the HTML parameters for the applet. A parameter marked "Opt" is optional, and a parameter marked "Req" is required.
| ||||||||||||||||||||||||||||||||||||||||||||||
xample An example of a HTML APPLET tag with all parameters for this applet is shown below. <APPLET CODE="ScrollingUpdateApplet.class" WIDTH="150" HEIGHT="100"> <PARAM NAME="text" VALUE="TextToScroll.TXT"> <PARAM NAME="maxSizeKB" VALUE="1"> <PARAM NAME="refresh" VALUE="300"> <PARAM NAME="notifyOnRead" VALUE="true"> <PARAM NAME="font" VALUE="Courier"> <PARAM NAME="fontSize" VALUE="18"> <PARAM NAME="fontStype" VALUE="bold+italic"> <PARAM NAME="fontColor" VALUE="0F342E"> <PARAM NAME="justify" VALUE="center"> <PARAM NAME="frameDelay" VALUE="75"> <PARAM NAME="background" VALUE="Graphics/BkgndImage.JPG"> <PARAM NAME="scrollRectX" VALUE="25"> <PARAM NAME="scrollRectY" VALUE="25"> <PARAM NAME="scrollRectW" VALUE="100"> <PARAM NAME="scrollRectH" VALUE="50"> </APPLET> | ||||||||||||||||||||||||||||||||||||||||||||||
ownload The object code for the applet ScrollingUpdateApplet and the canvas ScrollingUpdate along with a copy of this documentation are available for download. | ||||||||||||||||||||||||||||||||||||||||||||||
opyright This documentation and the object code for ScrollingUpdateApplet and ScrollingUpdate may be copied and distributed freely for non-commercial purposes so long as neither the code nor the documentation is altered in any way. If the object code is distributed with any documentation whatsoever, then this unaltered document must accompany the code. Copyright © 1997 by Modern Minds, Inc. |