The Parameters Explained             

Each of NewsAgent's parameters is explained below, with reference to the clickable example code in the left frame: you can click a parameter from the example code to jump to its explanation, or simply read this page from top to toe. As you read, click the red references to other parameters to jump to them.

Most of NewsAgent's parameters have a default setting which is mentioned below. If the default setting is the option you'd like to use in your own implementation, you can leave that parameter out of your HTML code.


The 'Archive' attribute & 'CabBase' parameter
JAR (Java ARchive) and CAB (cabinet) files are archives containing Java class files in compressed form, making them easier to handle and quicker to download. Most modern browsers are able to read one or other of these formats, and the Archive attribute and CabBase parameter tell the browser the name of the archive file to open. The .JAR, .CAB and .CLASS files must all be in the same directory, and the CODEBASE= attribute is used in the normal way, if required, specifying the absolute or relative location of this directory. Older browsers that are unable to read either the JAR or the CAB file will instead read the loose CLASS files.

Applet Width & Height
The width of the applet causes no complications: NewsAgent automatically wraps text according to whatever applet width you've set (taking into account your MarginWidth setting), so you can set this to be as narrow or wide as you wish.

Applet height is just as simple to deal with, but bear in mind that a larger height gives visitors to your page more chance to read the text before it vanishes 'off the top'!

If you set the applet to Loop a fixed number of times, eventually the animation will stop and the text will remain fixed on the screen. You may want to adjust the dimensions of the applet so that when that happens the entire text can be read.

Copyright
This parameter must be included or the applet will not run, whether registered or unregistered. To prevent mistakes we recommend that you copy/paste it into your code from the Getting Started page: it is case-sensitive, single-spaced throughout and should appear on a single line. If there's a problem with this parameter, you'll see a status-bar message that reads "Copyright parameter missing or incorrect" which should lead you to the problem.

BgColor
The applet's background color as a hex triplet, with a default of FFFFFF (white). You might wish to set this to match your page's <BODY> background color, or to something different to make the applet stand out. Your choice of color here should be made in conjunction with your setting for 3DBorder.

BgImage
Specifies the name (and location if necessary) of an optional GIF or JPEG image to be used as the applet background. Location is given as a relative or absolute URL, just as with the HTML <IMG SRC=> tag. If you include this parameter, it overrides your settings for BgColor and 3DBorder. The image you select will be automatically resized to fit your applet dimensions. It will not be tiled, but you'll never have to worry about it not being big enough to fill the entire applet area. Bear in mind, though, that this may create some distortion of the image - you may prefer to create an image that matches your applet dimensions, or (in reverse) to match your applet dimensions to those of your image, to ensure that the image is crystal clear.

3DBorder
This parameter has an effect only when the BgImage parameter is excluded. Your three possible options here are raised (which creates a raised 3D border using the BgColor), lowered (creating a depressed 3D border using the BgColor), or off, which gives a plain block of color with no 3D effect. None of these values is case-sensitive. Note that if you choose lowered, the BgColor you chose will be darkened considerably. The default setting is off.

ScriptFile
The name (and, if necessary, the location) of a text file whose contents should be displayed by the applet. This is in the form of a URL, and may be relative (such as "textfile.txt" or "../files/textfile.txt") or absolute (such as "http://www.protestors.com/plain.txt"). The relative URLs are specified in relation to the location of the HTML document containing the applet, as you'd expect. If no ScriptFile parameter is included, the text given in the DefaultText parameter will be used instead. Bear in mind that NewsAgent reads only plain text. The filename you specify can have any extension you like (including .HTM/.HTML/.JS/.VBS, etc), but don't expect it to read a Microsoft Word document with full formatting!

DefaultText
If you prefer not to use the ScriptFile parameter to enter your text, you can enter as much text as you like in the DefaultText parameter instead. To create paragraph breaks, enter the pipe symbol ( |) in the appropriate places, as in the example code in the left frame. If you've chosen not to use the ScriptFile parameter, and you've somehow forgotten to include the DefaultText parameter, the following text will be shown instead:

****Please enter the path to a text file in the ScriptFile parameter, and/or a valid string in the DefaultText parameter****

Note that because NewsAgent regards the pipe symbol as a directive to insert a paragraph break, you won't be able to display this symbol within your text. The symbol was chosen for the purpose because it's the character you're least likely to need to display.

Font
A comma-delimited value for the font to be used for the text display. The default settings are Dialog, style plain, at size 14, which would be written as Dialog,plain,14. Two important things to note: first, there must be no spaces in this entry; second, the three items must appear in the order name,style,size. Note that the style part of this setting can be plain, bold, italic or bolditalic, and these are not case-sensitive.

TextColor
The color of the font to be used for the text display, as a hex triplet. The default is a sober 000000 (black).

TextFocusColor
The color of the text when the mouse enters the applet. The default for this parameter is whatever you selected as your TextColor, meaning that if you leave this parameter out, the text won't change color when the mouse enters.

TextPressColor
The color of the text when the mouse clicks inside the applet. Again, the default is whatever you selected as your TextColor, meaning that if you leave this parameter out, the text won't change color when the the applet is clicked.

MarginWidth
Sets the width of the left and right margins, in pixels, between which the applet will wrap the text to form a paragraph (if the text is long enough to need it). The default is 10.

CharacterDelay
You could think of this as being the speed of the text animation, but in fact it doesn't work that way. This parameter sets the delay time between each separate character appearing, so lower numbers will produce faster animation. The default is 25. (Although "0" is quite legitimate, "10" is just about as fast as anyone could stand!)

ParagraphDelay
The length of the pause before the next paragraph begins to display, where lower numbers mean shorter pauses. The default is 500 (half a second).

RepeatDelay
The length of the pause before the ScriptFile or DefaultText is repeated. The default is 1500 (one-and-a-half seconds).

Loop
The number of times the ScriptFile or DefaultText should be shown. Any number is valid here (although 0 won't display the text at all!), or you can enter the word infinite (not case-sensitive) to have the applet loop endlessly. Infinite looping is the default setting.

Update
When a remote text file has been specified in the ScriptFile parameter, NewsAgent will automatically check for a newer version of that file at regular intervals, and display that version instead. This parameter lets you specify that interval as a figure, in minutes. The default setting is 10 (ie. every 10 minutes). Note that Loop must be set to 'infinite' (its default setting) for auto-updating to happen.

Sound
Specifies whether or not you'd like NewsAgent to accompany the text animation with sound. A value of yes turns the sound option on, a value of no turns it off, and the values are not case sensitive. The default is no sound. See Using Sounds at the bottom of this page.

OnClick
NewsAgent has two interactivity modes, which are the values for this parameter: hold or link. Neither value is case-sensitive. With the value set to hold, a mouse click will toggle the text animation between pause and resume, giving a reader a chance to catch up if the applet is moving faster than he'd like, or simply to pause for thought. If the applet has been set to Loop a fixed number of times rather than infinitely, the text will remain on the screen when the final loop has been played. At this point, in 'hold' mode, a click will restart the animation from the beginning. The default setting for this parameter is hold.

With the value set to link, a single click will open the specified URL into the specified target frame or window, using the two parameters below. In 'link' mode, a click will always open the URL -- it cannot toggle between pause/resume or restart the animation once looping has finished.

URL
With the applet used in link mode (set in the OnClick parameter), this parameter becomes active. It specifies the relative or absolute URL of a web page or other resource that should be opened when the mouse is clicked within the applet area. (Note that if you use the applet in hold mode instead, there's no need to remove this parameter from your HTML page - it'll be ignored.) It's also worth noting that although Java does support #name anchors appended to URLs (to link to particular parts of a page), not all browsers will react correctly to it, so its use is generally best avoided.

For testing purposes, you can prevent the applet linking anywhere when clicked by prefixing the URL with the dollar sign ($).

Target
With the applet set to link mode, this parameter specifies the name of the frame or window into which the URL should be opened. The default is _top. (Note that if you use the applet in hold mode instead, there's no need to remove this parameter from your HTML page - it'll be ignored.)

LinkMessage
If you use the applet in link mode, you can specify your own tooltip message that will appear when the mouse enters the applet area, and this is the parameter that lets you do it. The default is blank (no message).

UseTooltips
NewsAgent can optionally display tooltip messages within the applet area that move with the mouse. The simple values for this parameter are yes or no, and are not case-sensitive. The default is yes. When tooltips are used, what is displayed depends upon whether you've selected hold or link mode in the OnClick parameter. In link mode, the tooltip message will be that chosen in the LinkMessage parameter. In hold mode, the tooltip message will switch between Click to pause and Click to resume, according to the applet's current status. If you set your Loop parameter to a fixed figure (rather than infinite looping), the tooltip will display Click to restart when the allotted loops have finished, indicating that a click will restart the animation.

TooltipColor
A hex triplet that sets the color of the text used for the tooltip, and the color of the tooltip's outline. The default is 000000 (black).

TooltipBgColor
Another hex triplet setting the color of the tooltip's background (or fill). The default is 80FF80 (a sort of pale green).


Using Sounds
Three audio files (.au format) are included with NewsAgent. If you'd like NewsAgent to accompany text-display with sounds, place these three files in the same directory as the class file (ryNewsAgent.class) and set the value of the Sound parameter to Yes. If you prefer your pages to be seen and not heard, you have three options: you can set the parameter's value to No, remove the parameter entirely, or delete/remove the audio files. If you want to use only some of the sounds, set the parameter's value to Yes and just remove the files you don't want to use from that directory. For example, you might like the applet just to notify you when the ScriptFile has been updated, in which case you'd leave the Sound parameter set to Yes, but remove the TypeKey.au and TypeReturn.au files.

The names of the three files are fixed: TypeKey.au plays when a character appears (ie. pretty frequently!). TypeReturn.au plays when the text is wrapped to the next line. Updated.au plays when a change to the contents of the ScriptFile has been detected (thus, of course, it will only ever play when you're using the ScriptFile parameter as opposed to the DefaultText parameter to specify your text). If you'd like to replace these with your own files, go right ahead. The only restrictions are that the files must be in Sun/NeXT format (.au), must be in the class directory, and must use the filenames given above.

If these sounds aren't to your taste, try the SoundPack for a whole bunch of extra choices. Just replace these files with the ones you want to use, making sure you rename the replacements as noted above. You'll find a link to the SoundPack by visiting Cool Focus and clicking the 'Free Downloads' link.


































.