 
 |
|
|
aveBannerApplet (Version 1.0)
WaveBannerApplet
is an applet and a canvas class that can be used to animate a line of text for
use as a banner. The animation moves each character in the string of text up and
then down in a sequential manner so that the effect is similar to a wave
modulating the line of text. Two additional optional effects are also included:
an "inverting vertical wipe" effect and character highlighting effect.
The
following documentation describes how the
WaveBannerApplet class is used. You can also use the WaveBanner
canvas class if you wish to integrate wave animation in your own application or
applet. The WaveBanner class is
documented separately. |
|
 |
peration
When loaded, WaveBannerApplet initializes
by determining the largest size of the font Helvetica Bold that can be used to
draw the entire string of text within the confines of the applet's boundaries.
The applet then begins an animation based upon the parameters that were
specified. The parameters and their effects are described below. |
| |
 |
ample
If your browser supports Java, you
should see a demonstration of the WaveBannerApplet above this text. |
|
 |
arameters
Following are the HTML parameters for the applet.
A parameter marked "Opt" is optional, and a parameter marked "Req"
is required.
| Opt |
text |
The text string to display in the banner.
The
font size is scaled so that the entire string will fit within the dimensions of
the applet. (See also waveHeight below.)
If this parameter is
not specified, then its value defaults to "Text Parameter Missing!". |
| Opt |
color1 |
The background color.
If the "wipe"
effect is enabled (see wipeMS below), then the background color and the
foreground color will alternate with each other.
The value must be a
hexadecimal RGB value. If instance "FF0000" would be red, and "888888"
would be a medium gray.
The color defaults to black if not specified. |
| Opt |
color2 |
The foreground color.
If the "wipe"
effect is enabled (see wipeMS below), then the background color and the
foreground color will alternate with each other.
The value must be a
hexadecimal RGB value. If instance "FF0000" would be red, and "888888"
would be a medium gray.
The color defaults to white if not specified. |
| Opt |
colorHL |
Character highlight color for "wave"
effect.
If the "wave" effect is enabled (see waveHeight
below), and if a color is specified for this parameter, then character
highlighting will be performed with the specified color when the character
crosses the baseline during animation.
The value must be a hexadecimal
RGB value. If instance "FF0000" would be red, and "888888"
would be a medium gray.
If this parameter is omitted, then no
character highlighting will be performed. |
| Opt |
colorFrame |
The highlight color used in a frame around the
applet.
A frame around the applet area is drawn only if a color
is specified for this parameter.
The value must be a hexadecimal RGB
value. If instance "FF0000" would be red, and "888888" would
be a medium gray.
If this parameter is omitted, then no frame will be
drawn. |
| Opt |
waveHeight |
The maximum vertical distance that a character will
travel during the "wave" animation.
This value will also
affect the size of the font as the font is scaled so that the maximum wave
height can be reached.
If this parameter is zero or is not specified,
then the wave animation will not be performed. |
| Opt |
cycleMS |
The number of milliseconds to delay at the end of
each animation cycle.
The parameter value defaults to 1000 (1 second)
if not specified. |
| Opt |
waveMS |
The number of milliseconds to delay between each
frame of "wave" animation.
This parameter determines the
speed of the "wave."
The parameter value defaults to 50 if
not specified. |
| Opt |
wipeMS |
The number of milliseconds to delay between each
frame of "wipe" animation.
This parameter determines the
speed of the "wipe."
If this parameter is zero or is not
specified, then "wipe" animation will not be performed. | |
|
 |
xample
An example of a HTML APPLET tag with all
parameters for this applet is shown below.
<APPLET CODE="WaveBannerApplet.class" WIDTH="300" HEIGHT="50">
<PARAM NAME="text" VALUE="A Wave Banner Demonstration">
<PARAM NAME="color1" VALUE="7D3B9D">
<PARAM NAME="color2" VALUE="DEFFFD">
<PARAM NAME="colorHL" VALUE="686EE0">
<PARAM NAME="colorFrame" VALUE="DEFFFD">
<PARAM NAME="waveHeight" VALUE="10">
<PARAM NAME="cycleMS" VALUE="2000">
<PARAM NAME="waveMS" VALUE="30">
<PARAM NAME="wipeMS" VALUE="50">
</APPLET>
|
|
|
 |
ownload
The applet WaveBannerApplet,
along with a copy of this documentation, is available for
download
as a standard zip file, as a self-extracting file (for Windows95/NT users),
or as a self-installing Java class file.
|
|
 |
opyright
This documentation and the object code for WaveBannerApplet
and WaveBanner may be copied and distributed freely for non-commercial
purposes so long as neither the code nor the documentation is altered in any
way. If the object code is distributed with any documentation whatsoever, then
this unaltered document must accompany the code.
Copyright © 1997, 1998 by Modern Minds, Inc.
|