NewsMaker.class Java Applet
Documentation

©2002 by MicroTicker.com and OEC Corp
All Rights Reserved
.
NewsMaker is a vertical text scroller or "ticker" that is set up in the page like a standard Java applet, but which reads its content (the messages and their associated links) from a text file.  The benefit of this approach is that, once installed, no modifications to page code are ever needed to change the messages or their associated links; rather, one changes only the text file with the content.

The NewsMaker kit also includes a free Message Tool.  The Message Tool is a software utility for Windows that makes creating or changing the content text file very quick and easy to do -- no tedious, difficult hand-editing is required.  Type in the messages and their associated links (and targets, if needed); save the file; send it to your server -- and you're done.

.
Initial Set-Up: Quick Start
.
Step One: The Page Code
.
NewsMaker is specifically designed to be extremely easy to install, and will run with a bare minimum of parameters.  To get started, insert this code snippet in the body of your html page where you wish to have the applet appear:

<applet code="NewsMaker.class" width="250" height="400">
  <param name="Notice" value="Applet by www.MicroTicker.com">
  <param name="KeyCode" value="FREE">
  <param name="Script" value="NewsMaker.txt">
</applet>

You can then work with the remaining parameters, later -- all the rest are optional -- to add features and to blend the applet into your design.  (Your key code can be inserted at any time; see the KeyCode parameter below.)

.
Step Two: The Message-and-Link File
.
NewsMaker uses an external text file to store the messages and associated links that it will display.

Use the Windows software Message Tool included in this kit to create a message-and-link file, and save it as NewsMaker.txt.  (For those on other platforms or who wish to hand-edit, instructions are in the final section of this documentation.)  You can also use any of the sample NewsMaker.txt message-and-link files included in the demos shipped with this kit.

.
Step Three: Sending to the Server
.
Three files must go to the server:

1.) Send the html page containing the applet code.
2.) Send the NewsMaker.class file -- this must be sent in binary mode.
3.) Send the NewsMaker.txt file -- this must be sent in ascii mode.

Generally, all three files should be in the same directory.

That's it, you're done!

.
Settings and Parameters
.
Width and Height
<applet code="NewsMaker.class" width="250" height="400">
The width and height of a Java applet are not set with parameters; rather, they are set in the main <applet> tag.  As shown above, the applet space would be 250 pixels wide and 400 pixels high.

Please also remember that the class file must be sent to the server in binary mode, never in ascii; and that class filenames are case-sensitive.  The class file will usually be in the same directory as the page containing the applet code.

.
Notice Parameter
<param name="Notice" value="Applet by www.MicroTicker.com">
The Notice parameter and value must be present, exactly as shown.  An incorrect or missing Notice parameter will not cause the applet to fail, but it will show an error message.
.
KeyCode Parameter
<param name="KeyCode" value="key_code_here">
The KeyCode parameter must be present, and correct.  An incorrect or missing KeyCode parameter will not cause the applet to fail, but it will show an error message.  Common errors with key codes include mistaking numbers for letters (or vice versa), leaving out the quote " marks around the value or the closing > carrot at the end.  Take care when inserting your key code that it is exactly correct, as shown in the email you receive with the key code.

The key code is obtained from the log-in area, which is explained in the introductory email when you purchase.  Use only your domain name (for instance, http://www.yoursite.com or http://yoursite.com [either way is correct, in all cases]) and do not use subdirectories or pages in the address when you make the key.  This will allow the applet to function fully on any page in your site, on as many pages as you wish to use it.  If you are uncertain what to use, contact us via the Support form on www.MicroTicker.com.

During initial setup (or for those operating private, non-profit sites), "FREE" (all uppercase) may be used in the KeyCode parameter's value.  Our notice message will appear in the applet with this value in the KeyCode parameter; however, it does not appear when a purchased key code is used.

.
Script Parameter
<param name="Script" value="NewsMaker.txt">
The Script parameter tells the applet what file from which to read the messages and links.  If you use the default name [NewsMaker.txt] you may omit this parameter, as the applet will assume the default name.  Normally, this file (i.e., NewsMaker.txt) is in the same directory as the page containing the applet.  Filenames are case-sensitive; and only relative links may be used on most servers -- http:// paths are typically not allowed.

Note that the applet will still run, even if the Script parameter is incorrect; it will show an error notice indicating the script file could not be found.

.
Margin Parameters
<param name="LeftMargin" value="10">
<param name="RightMargin" value="12">
<param name="TopMargin" value="5">
<param name="BottomMargin" value="15">
The margin parameters allow you to adjust where the scrolling text will appear within the applet space on the page; quite useful for close adjustments when using background images with the applet.

The values are in pixels, relative to the edges of the applet space.  In the sample above, the scrolling area would cover an area 10 pixels from the left edge through 12 pixels from the right edge and 5 pixels from the top edge through 15 pixels from the bottom edge.

Any margin parameter may be omitted.  The default value for all margin parameters is "5".

.
Font Parameters
<param name="FontName" value="Dialog">
<param name="FontSize" value="12">
<param name="FontStyle" value="plain">
The Font parameters set the overall font face, size, and style.

The FontName parameter sets the font face. Only the following FontName values are allowed and considered supported in standard browsers:
- Dialog
- SansSerif
- Serif
- Monospaced
- Helvetica
- TimesRoman
- Courier
- DialogInput
You may omit the FontName parameter; the default value is "Dialog".

The FontSize parameter sets the size of the font.  Generally suggested values range from 12 through 16; though larger sizes are also possible if needed.  You may omit the FontSize parameter.  The default value is "12".

The FontStyle parameter sets the style of the font.  Only the following values are accepted:
- plain
- bold
- italic
- bolditalic
The FontStyle parameter may be omitted; the default value is "plain".

.
Justification Parameter
<param name="Justification" value="left">
The Justification parameter sets the horizontal alignment of the message lines.  The acceptable values are:
- left
- center
- right
The Justification parameter may be omitted; the default value is "left".
.
HeadLines Parameter
<param name="HeadLines" value="no">
If set to "yes", the HeadLines parameter activates a feature set that causes the first line of each message to be a different color from the rest of the message.  If set to "no" or omitted, the first line and the body of the message will be the same color. [ See the next section on text colors for more details.]  

The HeadLines parameter may be omitted; the default value is "no".

.
Text Color Parameters
<param name="TextColor" value="#000000">
<param name="TextHotColor" value="#008000">
<param name="HeadLineColor" value="#0000FF">
<param name="HeadLineHotColor" value="#FF0000">
Text color parameters are set in hex/rgb, the same way you set colors in html.  [That is, #FFFFFF is white, #000000 is black, #FF0000 is red, #00FF00 is green, #0000FF is blue, etc.] This makes color-matching to page color schemes quite easy to do.

TextColor sets the overall color of the message text when the mouse is not over the applet space.

TextHotColor sets the overall color of the message text when the mouse is over the applet space.

Only if the HeadLines parameter (above) is set to "yes", then the following parameters are activated:

HeadLineColor sets the color of the first line of the message text when the mouse is not over the applet space.

HeadLineHotColor sets the color of the first line of text when the mouse is over the applet space.

Any text color parameter may be omitted.  The default values are:
- TextColor = black
- TextHotColor = dark green
- HeadLineColor = blue
- HeadLineHotColor = red 

.
BackgroundColor Parameter
<param name="BackgroundColor" value="#FFFFFF">
The BackgroundColor parameter sets the background color of the applet space.  It is set in hex/rgb, the same way you set colors in html.  [That is, #FFFFFF is white, #000000 is black, #FF0000 is red, #00FF00 is green, #0000FF is blue, etc.] This makes color-matching to page color schemes quite easy to do.

Note that if you use an image for the background which covers the whole applet space (see next parameter, below), the applet background color cannot be seen and will have no effect.

The BackgroundColor parameter may be omitted; the default color value is "#FFFFFF" (white).

A very commonly asked question is whether applets can be made transparent to the page.  They cannot.

.
BackImage Parameter
<param name="BackImage" value="yourimage.jpg">
The applet supports a background image, which appears beneath the scrolling text.  In general, all Java applets prefer .jpg images and perform best and most smoothly with them; but .gif images usually work well, too.  Compressed .jpg's are suggested (do not use progressive encoding); and images should generally be the same size as the applet space.

If you are not using a background image, omit this parameter.

.
Speed and Timing Parameters
<param name="Pause" value="3000">
<param name="Speed" value="10">
The Pause parameter sets the amount of time (in milliseconds; that is, thousandths of a second) that each message will pause at the top of the applet space.  The Pause parameter may be omitted; the default value is "3000" (that is, three seconds). Caution: Setting the Pause value too small may possibly cause occasional skipping, especially if a sound file is used or Speed (below) is set unusually slow or fast.

The Speed parameter sets the overall scrolling speed of the text.  The value is in milliseconds, and larger numbers produce slower scrolling.  A suggested range is 5-25.  The Speed parameter is very often omitted; the default value is "10".

.
SoundFile Parameter
<param name="SoundFile" value="yoursound.au">
The applet supports a sound file, which will be triggered as each message reaches the top of the applet space.  The sound file is entirely optional.  Simply omit the parameter if you do not wish to use sound.

Standard Java applets support only Sun Java .au sound files, specifically in 8-bit u-law mono and 8000 Hz format.  Files in any other format are not read.  (Many standard sound utilities can convert files to this format.  One such we have used for years is CoolEdit from Syntrillium.com)

The download kit includes a number of sample .au files; others are available from the archive at CodeBrain.com. Additionally, there are numerous sound archive sites on the Net, though one should take care to check the format of .au files they offer as some may not be in the proper format (above).

.
Creating Message-and-Link Files, Via Included Software or Manually
.
The Message Tool Software
NewsMaker includes a Windows software Message Tool for creating the message-and-link files.  Complete help is provided within the Message Tool application itself.  In brief:

Use of the Message Maker tool is a fast and virtually effortless way to make and maintain this external text file. Enter a link (and a target, if needed) along with the message, and hit the Add Message button. Continue doing so until all your messages are ready. Save the file and send it to your server, and -- you're done.

Later, if you want to change, reposition, edit, replace, add, or delete messages and their associated links -- just open the message text file, and use the simple controls in the Message Maker tool to do the work.

The Text File Protocol
For non-Windows users, for those who wish to hand-edit, or for those who may wish to create customized server-side scripting, we include the protocol for the text file, here.

The format is in two lines for each message: a "Link Line" followed by a "Message Line".  Both lines must be present for every message, even if no link or target is required.

Lines may not contain tabs, line breaks or carriage feeds within the line.  Lines must have a single linefeed-carriage return at the end (that is, press the Enter key at the end of a line).  Empty lines are not allowed.

The Link Line Format:

Begin the line with ### (three 'pound' signs).  Whether or not a link is used, this must be present.  Put the relative or explicit link address path after the ### signs.  If a target is required, append @@@ (three 'at' signs), followed by the target name.  Spaces are not allowed anywhere in the link line.  Here are some samples of the link line:

###

This (above) is what you would use for no link.

###http://www.somesite.com/somepage.html

This (above) is what you would use with an explicit http path for a link.

###somepage.html

This (above) is what you would use for a relative link.

###http://www.somesite.com/somepage.html@@@_blank

This (above) is what you would use for an explicit http link with a target (in this case, open in a new window; that is, "_blank").

###somepage.html@@@goober

This (above) is what you would use with a relative link and a target; in this case presumably a frame called "goober" in a frameset.

As implied above, both relative and explicit http paths are supported, as are both standard and frameset targets. Please note that you must not use quote marks around addresses or targets.

The Message Line Format:

The message line is comprised of a single line, without tabs, line breaks or carriage feeds within it.  It must have a a single linefeed-carriage return at the end (that is, press the Enter key at the end of the line).

Use of these character strings is forbidden: ###, @@@, ^^^.  Use of the pipe | sign is forbidden.  Use of the back \ slash is forbidden. These characters and strings are used internally by the applet.

The overall length of the Message Line is arbitrary, with no practical limits in general use (theoretically, it's 64K).  Messages are stored in dynamically allocated vector arrays in the applet, so practically speaking, again, there is no limit to the number of messages (theoretically, it's 256 messages). Do bear in mind, though, that very large files will take longer to load; so, as with anything on the Net, brevity is desirable.

Putting It Together:

A typical message file (see also the message files included with the demos in this applet kit) would appear as below:

###
This is the first message, and it has no link
###somewhere.com
This is the second message, and it has a relative link
###http://www.somesite.com/somepage.html@@@_blank
This is the third message and it has a relative link set to open in a new window (_blank target).

Message files are, of course, simple text files; and must be sent to the server in ascii mode.

.
.
Legal Notices
The NewsMaker applet, its associated Message Tool software, and this documentation are ©2002 by MicroTicker.com and OEC Corp., all rights reserved.  Duplication, redistribution, or resale of these products in any manner or form is strictly prohibited under penalty of law.

MicroTicker™, MicroTicker.com™, CodeBrain™, CodeBrain.com™, NewsMaker™, OEC InterNET Group™, and OEC Corp™ are registered trademarks of OEC Corp.

.
.
[End of Documentation]