Thanks for download this applet, you will need to add some lines of HTML to your page in order to make use of it. All the possible parameters are listed below, remember that in most cases you will not need all these paramters and if you don't need them don't add them! Each parameter is explained separately below:

In addition to the default font file contained within the downloadable zip archive you will find some additional graphics (and appropriate parameters) on the Rotate Scroll homepage at Java Download.

The following text describes each of the parameters in turn. As with all my applet descriptions any parameter with a green background is required, yellow backgrounds indicate optional entries, default values for each parameter are enclosed within brackets next to the name. Please remember to replace the variable type in the above parameters with an appropriate entry, eg. [integer] could be 1, 2, 3, etc. The width of the applet will depend on the number and size of characters you are displaying. The easiest way to find the exact width of the applet is to enter any figure for the width and then look at the Java Console (you may need to enable this in the advanced properties of your browser). If you are unsure what the Java Console is please see the help file for your browser..

  text  [see below]

This parameter is really the only required parameter for basic operation of the applet. At present the parameter takes a simple text string as its value. Remember that the applet maps letters to their equivalent, if they exist, in the graphics font file. If you are using the default font then please see the fontchars parameter for which letters can be mapped.

  fontfilename  [images/fonts/default_font.gif]

This parameter, which takes a path/filename as its value tells the applet where to find the image file containing the font.

  tube  [images/tube.jpg]

This parameter like the fontfilename takes a path/filename as its value. This image is the tube displayed the text, in addition it helps hide the background text so that it appears to go behind the tube. The default image supplied is 240 pixels wide and 80 pixels high and should suffice for most font graphics. However you of course may alter its dimensions or colour as required. The graphic is automatically centred behind the text so there is no need to specify its height or width explicity.

  displaychars  [20]

This parameter, which takes an integer as its value, sets the number of blocks visible on the screen. The default value is 20 as in the demo at the top of this page. However you can use any value you like both odd and even. When choosing the number of displaychars you should two things in mind. Firstly the more characters you display the more processing power is used, there is a lot of graphical manipulation going on so remember those with slower processors! Secondly keep in mind that displaying a high number of characters, and worse a high number of wide characters may lead to low resolution displays having to scroll their browser window.

  scrollby  [5]

This parameter taking an integer as its value determines how many pixels the line is scrolled by during each iteration. The default should be fine but you can of course slow it down or speed it up (not recommended!) as you desire.

  spacing  [2]

The default spacing value, which takes an integer as its value is set at 2 pixels. For most types of graphical font this should be adaquate. However some may look better with smaller values, some with larger ones. Feel free to alter this as required.

  charwidth  [32]
  charheight  [32]
  charxoffset  [0]
  charyoffset  [0]
  charxstart  [0]
  charystart  [0]
  blocksinfile  [60]
  blocksperline  [10]
  fontchars  [see text below]

Example block image file layout
Figure 1 - Layout of block image files
This large group of parameters is key to allowing you to use alternative graphical font files (so ignore these parameters if you only intend using my supplied font file). Please make sure you read this section fully if you intend using your own files.

Every individual character within the image file must be of an equivalent height and width (although the height and width themselves need not be the same). To set these parameters you must give integer values to charheight and charwidth. So for my supplied font file I would set both blockheight and blockwidth to 32. See D and F on Figure 1.

With the width and height of the characters defined the next step is to define how the applet finds each block within the file. To achieve this you must supply integer values to four parameters; charxstart, charystart, charxoffset and charyoffset. The first two tell the applet how far from the left and top edges (respectively) the blocks start, see A and B on Figure 1. The second two specify the distance between blocks both horizontally and vertically (respectively), see C and E on Figure 1. In my example image file the values of all these parameters has a default of 0.

Default Character font file
Figure 2 - "default_font.gif"

With the layout of the image file now known you must also supply three further parameters. The first of these blocksinfile is an integer value equal to the total number of characters in the block file (if you are supplying two block image files this number must be equal for both). So my example block image file (see Figure 2) this would default to 60. In addition the applet needs to know how many blocks there are per line, set this by supplying an integer value to blocksperline, there must be an equal number of characters on each line and again two image files must have equal numbers of blocks per line. Again using my image file as an example I would set this parameter to a value of 10.

The final parameter required fontchars defines how you want to map the font characters to a key on the keyboard. Please remember that you obviously cannot directly map quotation marks (") to a block! Instead map them to some other character and use that in your text instead, eg. ^. To map the characters you simply supply a string where each character maps to a block in the file, starting from the top left and going from left to right, top to bottom. There seems to be problem with either the Microsoft JVM, Internet Explorer or the JVM's in general in that any leading or trailing spaces in the parameter value are stripped off! To get round this I map SPACE on the keyboard to some graphic character other than the first or last. I also try to map any other space present in the font graphic file to a null character, ie. one I never intend to use such as #, &, $, etc. This just helps prevent problems. So the value of this string for my example image file is:

~!#########',#. 0123456789#####?#ABCDEFGHIJKLMNOPQRSTUVWXYZ#

Note in the above how even though both the first and last characters in the graphic file are spaces I have instead mapped them to a null character. The real SPACE is mapped between the . and 0, although I could have mapped it to any of the spaces other the first or last. If you have any problems using these parameters to enable you to use your own font designs then please email me (see icons at top of page). In addition please remember that a number of fonts are available for download and which include the HTML required to make them work, see above.

  bgcolor  [000000]

This parameter allows you to set a general background colour for the applet. The default is black (000000) and the format for entry is the standard hextriplet used in HTML tags. So for example to set the background to white use a value of FFFFFF, for pure red use FF0000, etc.

I hope you enjoy this applet, feel free to email me or leave a message in the guestbook (see icons at top of page). Similarly if you have problems or suggestions for improvements drop me an email or leave a message in the guestbook. Please also remember to abide by the conditions of use you agreed to on download.