Stuart Baker Software offers high quality consulting services and products to users of IBM PCs and compatibles (DOS and Windows)
    as well as Interdata, Perkin-Elmer and Concurrent Computer Corporation 3200 series machines (OS/32).

ScrollText Applet


 

The ScrollText Java applet scrolls a user supplied text string across the applet window. It allows selection of the font name, style and size as well as colors and speed of motion. You can also define the width and color of a 3D border around the applet window. Here is an example of the ScrollText applet:

The HTML applet tag defines the width and height of the applet window. In addition, the ScrollText applet is controlled through twelve optional HTML parameters.

  • usertext - Defines the text that is scrolled across the applet window. It defaults to the copyright message if none is supplied.
  • fontname - Defines the name of the font used to display the scrolling text. It defaults to "Helvetica" if none is supplied.
  • fontstyle - Defines the style of the font used to display the scrolling text. It defaults to "BOLD" if none is supplied.
  • fontsize - Defines the point size of the font used to display the scrolling text. It defaults to 16 if none is supplied or if the supplied value is not in the range of 5 through 120.
  • stringmargin - Defines the left and right string margin. It defaults to 15 if none is supplied or if the supplied value is not in the range of 1 through 30.
  • sleeptime - Defines the number of milliseconds to sleep between increments of text movement. It defaults to 55 ms if none is supplied.
  • pixels - Defines the number of pixels to move the display string every sleeptime milliseconds. It defaults to 3 if none is supplied or if the supplied value is not in the range of 1 through 30.
  • 3DBdrWdth - Defines the width in pixels of the 3D border around the display window. It defaults to 0 if none is supplied or if the supplied value is not in the range of 0 through 10.
  • bdrRGB - Defines the 3D border color. The format is: nnn nnn nnn - where nnn may range from 0 through 255. It defaults 0 255 255 (cyan) if none is supplied or if the supplied value is out of range.
  • fgRGB - Defines the foreground color for the scrolling text. The format is: nnn nnn nnn - where nnn may range from 0 through 255. It defaults 255 255 0 (yellow) if none is supplied or if the supplied value is out of range.
  • bgRGB - Defines the background color for the applet window. The format is: nnn nnn nnn - where nnn may range from 0 through 255. It defaults 0 102 255 (light blue) if none is supplied or if the supplied value is out of range.
  • interact - Enables/Disables the ability for the user to interactively change the pixel and sleeptime parameters by using his mouse.

The ScrollText applet used on this web site is written to the Java 1.0 standard. It should work with any browser that supports Java. We have another version of the applet, ScrollText3, that is written to the Java 1.1 standard. It has several internal changes and many additional capabilities:

  • Changed all of the code to use the new Java event handling methods for the mouse and buttons.
  • Added eight public methods to allow JavaScript to dynamically adjust the values that were supplied through the HTML parameters.
  • Added one public method that opens a color selection window that allows the user to visually select new colors for the Foreground, Background and Border.
  • Added automatic font point size adjustment. This ensures that the scrolling text will always make best use of the window height.

Unfortunately, ScrollText3 will not run on all browsers. If you are running a current browser on Windows98, go check out the interactive capabilities of the latest version of ScrollText3. We have done a parallel development of the two applets. This allows you to use ScrollText3 to dynamically adjust the parameters until you obtain the look that you want. Once you have achieved the desired look, all you have to do is plug the parameters into your HTML file and run the original ScrollText.


This SBSW.COM page has been optimized for printing.
Web Content Copyright © 1997 - 2010 Stuart Baker Software. All rights reserved.

Please use our Feedback form to submit questions or comments about this web site.
Web Content Copyright © 1997 - 2010 Stuart Baker Software. All rights reserved.
This site was last modified: Wednesday, December 29, 2010