Vertical Text Scroller

This page will explain the two new optional parameters that allow input from a text file, see the Vertical Text Scroller home page for details on how to use all the other applet parameters.

The scroller above looks and behaves exactly like the scroller on Vertical Text Scroller home page. The main difference between the two scrollers is how they get their input parameters. The scroller on Vertical Text Scroller home page gets all its input parameters from HTML param tags, the applet on this page gets some of its input parameters from a text file.

Using a text file as input to the applet is easy. Create a text file and put it in the same directory as the applet class file. Then use the 2 new applet parameters (textFile and insertTextFile ) to tell the applet the name of the text file, and where you want the lines displayed. See below for more detail.

Now users with no knowledge of HTML can dynamically alter the scrollers real estate by modifying a simple text file. Dynamically changing information, like news or weekly promotions, can now be displayed on the scroller quickly and easily.

The scroller supports unlimited number of lines from a text file. The scroller will now display as many lines as the text file holds automatically. This is perfect for using the scroller to display variable information from a database like stock quotes or news.

Get the updated scroller here: Vertical Text Scroller home page

HTML Example
<applet code="VertTextScroller.class" width="335" height="150"> <param name=textFileWrap value="yes"> <param name=textFile value="Demo3.txt"> <param name=numberOfLines value="23"> <param name=background value="white"> <param name=scrollDelay value="15"> <param name=lineSpace value="17"> <param name=linkFrame value="_top"> <param name=linkColor value="red"> <param name=manualPause value="0"> <param name=linkClick value="1"> <param name=sizeDefault value="17"> <param name=lineDefault value=" "> <param name=colorDefault value="black"> <param name=fontDefault value="Helvetica"> <param name=styleDefault value="PLAIN"> <param name=linkDefault value=" "> <param name=pauseValueDefault value="0"> <param name=lineOffsetDefault value="0"> <param name=line1 value="Free Vertical text scroller"> <param name=pauseValue1 value="7500"> <param name=style1 value="BOLD"> <param name=color1 value="red"> <param name=insertTextFile value="2-7"> <param name=line10 value="Features"> <param name=pauseValue10 value="9500"> <param name=style10 value="BOLD"> <param name=color10 value="red"> <param name=line11 value="Professional quality smooth scrolling."> <param name=lineOffset11 value="10"> <param name=line12 value="Adjustable scrolling speed."> <param name=lineOffset12 value="10"> <param name=line13 value="Manual scrolling/pausing using your mouse."> <param name=lineOffset13 value="10"> <param name=line14 value="Automatic pausing at any line."> <param name=lineOffset14 value="10"> <param name=line15 value="Mouse over highlighted URL links."> <param name=lineOffset15 value="10"> <param name=line16 value="Many fonts, styles, and colors to choose."> <param name=lineOffset16 value="10"> <param name=line17 value="Param tag syntax checking for easy setup."> <param name=lineOffset17 value="10"> <param name=line18 value="And more..."> <param name=lineOffset18 value="10"> <param name=line20 value="To view another example of this applet"> <param name=pauseValue20 value="5500"> <param name=style20 value="BOLD"> <param name=color20 value="red"> <param name=lineOffset20 value="10"> <param name=line21 value="click the URL below"> <param name=style21 value="BOLD"> <param name=color21 value="red"> <param name=lineOffset21 value="80"> <param name=line23 value="Lou Schiano's home page"> <param name=color23 value="blue"> <param name=style23 value="ITALIC"> <param name=link23 value="http://www.geocities.com/SiliconValley/Bay/6879/"> <param name=lineOffset23 value="65"> </applet>

 Optional Applet Parameters

textFile
This parameter identifies the name of the text file. Make sure the text file is spelled correctly, upper and lower case matter. Put the text file in the same directory as the class file: VertTextScroller.class.

For example, if your text file is named Demo3.txt, enter the following parameter:
<param name=textFile value="Demo3.txt">


textFileWrap
This parameter instructs the program to word wrap the text file. Leave this out to output exactly as the text file is without modification.

For example, enter the following parameter:
<param name=textFileWrap value="yes">

insertTextFile
This parameter controls where the applet will place the lines read from the text file. There are two different ways to specify this parameter:

Fixed number of lines from a input file:

    Use this option if you want a fixed number of lines from the text file to be displayed in the scroller. You must use the numberOfLines parameter to tell the applet the total number of lines to display (the total number of lines is the sum of all the lines in the text file plus the lines inputted from HTML param tags). This option can imbed a fixed number of lines from a text file with lines from the HTML param tags (see the example applet above).

    For example, if you want the lines in the text file to display at line 2 - line 7 of the scroller, enter the following parameter:
    <param name=insertTextFile value="2-7"> (enter a number, a dash, then a number, no spaces)

Variable (unlimited) number of lines from a input file:

    This option will display all the lines from the text file in the scroller, regardless of how many lines are in the text file. Enter a number that tells the applet where the lines will be placed in the scroller. Because the text file can have a variable number of lines, the numberOfLines parameter is not used, and will be ignored. With this option, you can also input lines using the HTML param tags, but these lines must display ABOVE the lines from the text file (for example, the first line can come from a HTML param tag, and all the rest from the text file).

    For example, if you want the lines in the text file to display starting at line 1 of the scroller, enter the following parameter:
    <param name=insertTextFile value="1"> (enter just a number)


 Limitations

The text file is intentionally simple to allow modifications to be as painless as possible for the non technical user.
  • Only one text file may be used per scroller.
  • The text file should only contain displayable text and commented lines (/*this is a comment).
  • Only one block of text will be inputted and displayed.
  • Where the lines from the input file are display on the applet must be predetermined by the HTML author (this is not controlled automatically by the input file).
  • Changing properties of the inputted lines must be done in the HTML file using param tags (for example, use the default param tag colorDefault to control the color of the inputted lines).

1