Typewriter Applet
supporting the ONETAG parameter!
-- written by Eric C. Harshbarger while at the New Media Marketing lab at Sun Microsystems, Inc. .
[CAFÉ]-[CREATORS]-[APPLETS]-[FAQ]-[RESOURCES]-[RULES]-[DOWNLOADING]
Ohio State University's College of Humanities is using this applet nicely... Bravo.
The Typewriter applet is a java program which can be used to display news or information relevant to a web page. It is flexible enough to allow the user to customize to his/her own page, but smart enough that most of the 'formatting' is done automatically.
NOTE: If you wish to have sound accompany the applet (which is heard when the mouse enters the display window), you must download the following files in addition to the Typewriter.class: hit.au, cr.au, ding.au These may be found in ftp://xm.com/pub/incoming/cafe/sounds/. The sound files should be put in a directory named audio which resides directly off the directory in which the HTML document and Typewriter class are housed.
The param tags are the lines which customize the applet to your needs. Following is a list of all the parameter options which are currently available. Note that the 'name=' of the parameter as typed into the HTML document SHOULD BE CAPTILIZED... it is not necessary to capitalize the 'value' attributes. Defaults (where described) indicate what appropriate values will be used if not explicitly given in the HTML document.
parameters (also see the optional ONETAG notation for parameters)
- TEXT
- FONT
- FONTSIZE
- MARGIN
- URL
- PAUSE
- SPEED
- BORDER
- CYCLES
- BGCOLOR
- TEXTCOLOR
- name=TEXT value=???
The value of this parameter is simply the text which will be typed into the display area. Multiple paragraphs should be separated by the pipe symbol, '|'. Paragraphs automatically have a line of space between them.
- name=FONT value=???
This value is the font used in typing. The default is 'Courier'.
- name=FONTSIZE value=#
This is, obviously, the size of the letters when typed. The default size is 12.
- name=MARGIN value=jpg or gif
This value is the number of pixels which are left blank on the right and left sides of the window. The default is one-tenth of the total applet width as a margin on each side.
- name=URL value=???
This value should be a web address (without the standard prefix of 'http://') which will be jumped to if the display window is clicked. The default URL is this explanation page.
- name=PAUSE value=#
This is the number of milliseconds waited between paragraphs (not lines). The default is 2000 (2 seconds).
- name=SPEED value=#
This is the relative speed of typing. The value should be a non-negative number. The default SPEED is 100.
- name=BGCOLOR value=#,#,#
This value should be three decimal numbers, each between 0 and 255 inclusive. The result is used as the RGB color of the background of the display window. The default is 255,255,255 (white).
- name=TEXTCOLOR value=#,#,#
This value should be three decimal numbers, each between 0 and 255 inclusive. The result is used as the RGB color of the text of the display window. The default is 0,0,0 (black).
- name=BORDER value='in' or 'out'
If a this parameter is defined, the window appears to be either slightly raised (out) or depressed (in) by the use of highlighting the edges. Highlight color is based on the BGCOLOR. The default is that no border is used.
- name=CYCLES value=# or 'infinite'
This is the number of times the TEXT will be cycles thru before the typing ends. If 'infinite' is used as the value, the typing will go on forever. The default is 'infinite'.
-- Comments and suggestions are welcome: harshec@cdware.eng.sun.com, address Eric Harshbarger
[CAFÉ]-[CREATORS]-[APPLETS]-[FAQ]-[RESOURCES]-[RULES]-[DOWNLOADING]
The Typewriter applet may be used freely by anyone. Neither Sun Microsystems, Inc. nor Eric C. Harshbarger is responsible for any problems resulting from the malfunction or misuse of this applet.
© Copyright 1996, Sun Microsystems, Inc.