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:

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 blocks you are displaying. For example, if you are displaying 24 blocks and they are each 30 pixels wide (as in my example above) the applet width would 24*30 = 720. The height is variable depending on your needs, a good average is 90.

  text  [see below]

This parameter is really the only required parameter for basic operation of the applet. To use the applet most effectively you should follow the simple tutorial provided by clicking the following link

CLICK FOR TEXT TUTORIAL


  filename  [images/blocks.jpg]
  filename1  [-]
  filename2  [-]

These three parameters, each of which take a path/filename as their values, tell the applet where to find the image file containing the block graphics. By default only one block style is used (for an explanation of multi-block use please see the text parameters) which results in filename having a default value of images/blocks.jpg. If you wish to use just one block style and it's in a different location or has a different filename from this default you should set this (filename) parameter.

If you wish to use multiple styles of block (ie. if you use the |b control character in your text, as in the demonstration at the top of this page) then you must set both the filename1 and filename2 parameters. The first gives the location and filename of the initial block style graphic while the second does the same for any alternative style you wish to use. For example the demo at the top of this page sets filename1 equal to images/block.jpg while filename2 would be images/block-2.jpg.

You do not and should not set both filename and the pair, filename1 and filename2 at the same time, just one or the other.

  screenblocks  [24]

This parameter, which takes an integer as its value, sets the number of blocks visible on the screen. The default value is 24 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 screenblocks you should keep three things in mind. Firstly the more blocks you display the more processing power is used (although the applet is quite processor friendly it is still an issue). Secondly not everyone runs at a resolution of 1024X768 or higher, therefore displaying more than 24 blocks (assuming the blocks are 30 pixels wide like the ones included with the applet) may require these people to scroll your page horizontally (something to be avoided). Finally choosing a number of blocks which is not exactly divisible by 4 will result in the number of possible drop sequences being reduced.

  accel  [2]

This parameter takes an integer as its value and effectively determines how quickly the blocks will fall (the value equates to pixels per second per second). It most cases (all but those applets where the height is extremely large) the default value of 2 should be fine. It should be noted that this value must be an even value, using odd numbers will cause unpredictable (usually applet failure) results.

  showtime  [2.0]

If you wish to alter the amount of time the blocks are displayed on screen (once they have become stationary) you should alter this parameter. The value taken is a decimal number representing the show time in seconds.

  bounciness  [0.85]

If you want to make the blocks bounce either more or less than they do by default then this is the parameter to change. It effectively amounts to the coefficient of restitution in an equation of motion and can be almost any decimal number (see note later). The default value of 0.85 should be fine in most cases but try experimenting and see what happens. Please note however that giving this parameter a value of 0.3 will cause it to fail.

  sequence  [-1]

This parameter taking a single integer as its value allows you to specify a specific sequence by which the blocks drop into place. This sequence will be used for all the lines of text. The default value of -1 results in random sequences being used for each drop. There are eight sequences built-in but the number available will depend on whether the number of screenblocks is exactly divisible by four and two. The general sequences and their requirements are tabulated below:

  framename  [ _top ]

If you are using URL's in your text then this parameter may (or may not) be of interest to you. By default any clicked URL's will be opened in the root window containing the applet, ie. the default of _top. If you would like these links to be loaded into a different frame or even window then you should specify the name of it using this parameter. If you enter a value here that does not correspond to any created frame or window a new browser window will be opened.

  blockwidth  [30]
  blockheight  [30]
  blockxoffset  [0]
  blockyoffset  [0]
  blockxstart  [0]
  blockystart  [0]
  blocksinfile  [50]
  blocksperline  [10]
  charsonblocks  [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 specify your own custom image block files (so ignore these parameters if you are using my supplied graphic files). Please make sure you read this section fully if you intend using your own files. In addition please remember that should you be using two image files all the parameters described below must be identical for both cases.

Every individual block within each image must be of an equivalent height and width. To set these parameters you must give integer values to blockheight and blockwidth. So for my supplied block files (both blocks.jpg and blocks-2.jpg) I would set both blockheight and blockwidth to 30. See D and F on Figure 1.

With the width and height of the blocks 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; blockxstart, blockystart, blockxoffset and blockyoffset. 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.

Primary default Image Block file
Figure 2 - "blocks.jpg"

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 images 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 50. 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 blocks 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 charsonblocks defines how you want to map the blocks 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. So the value of this string for my example image file is:

ABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890!?&.,:*()$^'+

If you have any problems using these parameters to enable you to use your own block designs then please email me (see icons at top of page).

  addsequences  [-]
  replacesequences  [-]

As well as the built-in drop sequences it is also possible to introduce your own. This is achieved through these two parameters. If you wish to replace all the built-in sequences with your own then use addsequences. If however you wish to add to the list of built-in sequences then use replacesequences. Use one or the other of these parameters, not both! A maximum of twenty five (25) sequences can be utilised. If you go over this limit the first sequence will be replaced by the latest one and so on.

Both parameters take the same form of value, a path and filename. The file should be a plain ASCII text document. The format of the file is quite straightforward, each line contains a sequence of numbers separated by spaces or commas. Each entry corresponds to the equivalent block displayed on screen, i.e. the first number represents the first block, the second number represents the second block and so on. The number represents the delay (in iterations) occuring before a block drops into place. For example, the following line would represent one of my sequences:

6,12,18,24,30,36,42,48,54,60,66,72,78,84,90,96,102,108,114,120,126,132,138,144

This would produce the sequential left to right drop pattern. As you can see, there are twenty four entries since I display twenty four blocks on screen. In my case I would have eight lines of text (representing my eight sequences) in my file each with twenty four numbers. An example sequence file is included in the zip file available for download.

  bgcolor  [FFFFFF]

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

  background  [-]

The final user changeable parameter allows you to add a background image behind the falling blocks. The parameter takes as its value a path and filename to the graphic you wish to display, the format can be either jpeg or gif. The image itself will be centred on the applet display.

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.