Fading Messages Java Applet


 

 


Class File Name: FadeText.class
Class File Size: 12K
Notice Tag: Fading Messages, Copyright (c) 1997 OpenCube Technologies, Registered 11523

 

How to use the Fading Messages applet

How to use the applet tags:

The applet tag identifies the location, class file name, and size of a Java applet. Below is a small sample applet tag (or view the source for this document to see the applet tag for the above implementation of Fading Messages). The first part of the tag code="FadeText.class" identifies the name of the Java program. The second part codebase="java/" identifies the relative location of the file (leave codebase out of the tag if the class file is located in the same directory as the HTML document).

<applet code="FadeText.class" codebase="java/" width="500" height="100">
<param name="desc0"value="OpenCube Technologies">
<param name="desc0"value="The Second Message">
</applet>

The third and fourth part of the applet tag identifies the width and height of the applet (usually measured in screen pixels) Fading Messages will position itself to work with whatever you set for the height and width.

The parameters are defined below the applet start tag with the parameter name first, followed by the value of the parameter. (see below for the complete Fading Messages parameter list). You may add as many parameters as the applet allows for, with Fading Messages it is unlimited. (Misspelled parameters will not affect the applet and will not generate an error message. If a parameter is not working, first double check its spelling and case.)

The last part works like all other HTML tags and defines the end of the applet tag </applet>.

 

The Parameters and how to define them:

Parameter 1 must be included in the applet tag in order for the applet to work. Most of the parameters will default if you fail to define them, however we suggest you include all the parameters so the applet is ensured give the desired look. Usually the easiest thing to do is cut and paste the applet tag info used in the sample and modify it to fit your web page.

Color Definition: This applet uses a simple RGB color scheme. To define a color in one of the color parameters use a value between 0 - 255 for the red, green, and blue components separated by commas and typed out in the correct r,g,b order. Below is a sample of how a color parameter should look, the example specifies several different sample colors for the "bgcolor" parameter.

WHITE: <param name="bgcolor" value="255,255,255">
GREEN: <param name="bgcolor" value="0,255,0">
BLACK: <param name="bgcolor" value="0,0,0">
YELLOW: <param name="bgcolor" value="255,255,0">
OFF WHITE: <param name="bgcolor" value="240,239,234">

The best way to choose the exact color you are looking for without having to guess the numbers is to access your systems Color Picker. Color Pickers usually allow you to drag the mouse over a rainbow type color grid to select a color, and show you the appropriate RGB values. In windows the Color Picker is accessible through MS Paint as well as a majority of the popular Imaging and HTML Authoring Software.

Parameters used to customize a specific message are indicated using a range, such as "bgcolor0" - "bgcolorN". To define a parameter for a specific message (available when noted as above), use "bgcolor0" to define, in this case, the background color for the 1st message - "bgcolor3" would define the background color for the fourth message etc, etc. All of these range parameters, except for the message parameter ("desc0" - "descN") also have a default which is the parameter name without a reference number. The defaults set the attributes for all messages and are only overridden when a custom parameter, such as the background color example above is defined. This makes for very simple customization of the entire applet with the option to further define some or all of the messages.

Parameter 1
Attribute: Copyright notice.
param name="Notice"
value="Fading Messages, Copyright (c) 1997 OpenCube Technologies - Freeware"
Note: This must be included for the applet to work.

Parameter 2
Attribute: Message
param name="desc0" - "descN"
value=X, where X is the message for the given frame.
Note: Messages longer than the width of the applet are automatically put in a multi-line format. If the specific message is to long to fit in the available applet space an error message will be generated. To fix the problem try a smaller font size or make the applet size larger.

Parameter 3
Attribute: Default Background Color
param name= "bgcolor"
Value=r,g,b where r,g,b represent the red, green and blue components of the color as described above.
DEFAULT: WHITE

Parameter 4
Attribute: Specific Background Color
param name="bgcolor0" - "bgcolorN"
Value=r,g,b where r,g,b represent the red, green and blue components of the color as described above.

Parameter 5
Attribute: Default Text Color
param name= "textcolor"
Value=r,g,b where r,g,b represent the red, green and blue components of the color as described above.
DEFAULT: BLACK

Parameter 6
Attribute: Specific Text Color
param name= "textcolor0" - "textcolorN"
Value=r,g,b where r,g,b represent the red, green and blue components of the color as described above.

Parameter 7
Attribute: Default Border Thickness
param name= "borderthickness"
Value=X, where X is the default thickness of the border for all messages.
DEFAULT: 0

Parameter 8
Attribute: Specific Border Thickness
param name= "borderthickness0" - "borderthicknessN"
Value=X, where X is the thickness of a specific border for any message.

Parameter 9
Attribute: Default Border Color
param name= "bordercolor"
Value=r,g,b where r,g,b represent the red, green and blue components of the color as described above.
DEFAULT: BLACK

Parameter 10
Attribute: Specific Border Color
param name= "bordercolor0" - "bordercolorN"
Value=r,g,b where r,g,b represent the red, green and blue components of the color as described above.

Parameter 11
Attribute: Default Message Font Size
param name="size"
value="X", where X is the default size of all message fonts.
DEFAULT: 24

Parameter 12
Attribute: Specific Message Font Size
param name="size0" - "sizeN"
value="X", where X is the specific size of a message font.

Parameter 13
Attribute: Message Font Name
param name="font"
value="X", where X is the name of a valid system font for all messages.
DEFAULT: "Arial"

Parameter 14
Attribute: Italic Style
param name="italic"
value=true or false, true = yes italics, false = no italics - plain text
DEFAULT: false

Parameter 15
Attribute: Bold Style
param name="bold"
value=true or false, true = yes bold, false = not bold - plain text
DEFAULT: false

Parameter 16
Attribute: Default Message Delay
param name = "delay"
value="X", where X is the default time in milliseconds that all message will pause for.
DEFAULT: 2000 (2 seconds)

Parameter 17
Attribute: Specific Message Delay
param name = "delay0" - "delayN"
value="X", where X is the time in milliseconds that a specific message will pause.

Parameter 18
Attribute: Default Color Delay
param name = "colordelay"
value="X", where X is the default time in milliseconds that all fades delay for between frames.
DEFAULT: 0

Parameter 19
Attribute: Specific Color Delay
param name = "colordelay0" - "colordelayN"
value="X", where X is the time in milliseconds that a specific fade delays for between frames.
DEFAULT: 0

Parameter 20
Attribute: Fade Jump Size
param name = "colorjump"
value="X", where X is jump size for all fades, increase the jump size to speed up the fade animation.
DEFAULT: 1

Parameter 21
Attribute: Specific Fade Jump Size
param name = "colorjump0" - "colorjumpN"
value="X", where X is jump size for the specific fade, increase the jump size to speed up the fade animation.
DEFAULT: 1

Parameter 22
Attribute: Default Horizontally Centered Status
param name = "xcenter"
value=true or false, true - the default alignment for all messages is horizontally centered. false - the default alignment for all messages is left justified.
DEFAULT: true

Parameter 23
Attribute: Specific Horizontally Centered Status
param name = "xcenter0" - "xcenterN"
value=true or false, true - the specific alignment for a message is horizontally centered. false - the specific alignment for a messages is left justified.

Parameter 24
Attribute: Left Margin and Right Margin
param name = "xoffset"
value=X, where X is the width of the left and right margins. Note: both centered and left justified text will stay within the defined margin. Margins start at the edge of a border, if defined (see param 7 & 8)
DEFAULT: 5

Parameter 25
Attribute: Default Destination URL Link
param name = "desturl"
value=X, where X is the default link for all messages. Fully qualify all URL's (e.g. "http://www.opencube.com")

Parameter 26
Attribute: Specific Destination URL Link
param name = "desturl0" - "desturN"
value=X, where X is the specific link for a message. Fully qualify all URL's (e.g. "http://www.opencube.com")

Parameter 27
Attribute: Default Load Destination URL Where?
param name="loadwhere"
The "loadwhere" tag specifies where the document specified in the "desturl"
tag should be loaded. The default is "_self"

"_self" show in the current frame
"_parent" show in the parent frame
"_top" show in the top-most frame
"_blank" show in a new unnamed top-level window
"name" show in a new top-level window named name

Parameter 38
Attribute: Specific Load Destination URL Where?
param name="loadwhere0" - "loadwhereN"
The "loadwhere" tag specifies where the document specified in the "desturlN"
tag should be loaded. The default is "_self"

"_self" show in the current frame
"_parent" show in the parent frame
"_top" show in the top-most frame
"_blank" show in a new unnamed top-level window
"name" show in a new top-level window named name


Fading Messages,, � 1996, OpenCube Technologies