The Parameters Explained             

Each of TextButton Professional'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 TextButton Professional'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
However you adjust the applet dimensions, TextButton Professional will always fill the entire applet area, so there is no problem in slotting it seamlessly into a web-page's wallpaper. If you opt to autowrap the text on the button, altering the size significantly will alter the layout of text.

If you opt to use one or more images, how you set the ScaleImages parameter will determine whether the images fill the entire applet area or are displayed centrally within the applet.

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.

Name
Specifies a unique name for an applet when used with the Cool Focus Satellites system. This name may be anything you like, but it should be the only applet currently running that has this name. If you're not using the Satellites system, you can ignore this parameter.

Satellites
A simple yes or no parameter that determines whether or not this applet should send mouse-move information to the Cool Focus satellites system. If you are using Satellites, include this parameter with a value of 'yes'. If you're not, either set the value to 'no', or leave out this parameter. Setting this parameter to 'yes' when no Satellite is being used will have the effect of making the applet respond to the mouse extremely sluggishly.

ButtonColor
Hex triplet for the color of the button. By default this is a 3D button. If you use that default (by leaving Button3D set at 'yes', stick with 'mid-range' colors such as C0C000 or 008080 to ensure that the applet can derive lighter and darker shades for the button-highlight and button-shadow. The default color is 008000 (mid-green).

ButtonFocusColor
A hex triplet for the color of the button when the mouse moves over it. This parameter defaults to the same color you chose for ButtonColor, saving the need to enter it if you don't want your button to change color.

ButtonPressedColor
Another hex triplet for the color of the button when clicked. Bear in mind that when the button is clicked, a darker derivation of this color is actually used, so the result will be less effective if you start with a very dark color. This parameter defaults to the same color you chose for ButtonColor, saving the need to include it if you don't want your button to change color.

Button3D
A simple yes or no parameter, and these values are not case sensitive. For compatibility with earlier versions the default is 'yes', providing a 3D button. If you want the button to blend into your page's background color so that only the text is visible, add the parameter with the value 'no'.

ButtonBevel
When Button3D is set to 'yes', a single-pixel bevel is automatically created around the button edge. To increase this, add this parameter with a number as its value. The same bevelwidth will be applied to the button in its unfocussed, focussed and pressed states. The default size is 1, and entering a value of 0 will be ignored - to achieve a bevelwidth of zero, leave out this parameter and switch off Button3D.

BgImage
Allows a background GIF or JPEG image to be used as the background for the button. You'll get best results by setting the Button3D parameter to 'no' to prevent bright outlines appearing above or below the image. If you use a GIF image with a transparency setting, the transparent color will be replaced by your choice of ButtonColor. See the note about Using Images below.

FocusImage
An optional background GIF or JPEG image to be used as the background for the button when the mouse passes over it. Once again, you'll get best results by setting the Button3D parameter to 'no' to prevent bright outlines appearing above or below the image. If you use a GIF image with a transparency setting, the transparent color will be replaced by your choice of ButtonFocusColor. See the note about Using Images below.

PressedImage
An optional background GIF or JPEG image to be used as the background for the button when clicked. If you use a GIF image with a transparency setting, the transparent color will be replaced by your choice of ButtonPressedColor. The default value for this parameter is no image. See the note about Using Images below.

ScaleImages
A simple yes or no parameter, in which yes is the default setting. This setting applies to all three images. If the images are scaled, their sizes will be adjusted to exactly fill the applet area; this may produce unusual results if the relative dimensions of the images differ from those of the applet. If images are not scaled, they will automatically be centered within the applet area. Thus, an image that's smaller than the applet will have a border around its edges that takes your chosen ButtonColor/ButtonFocusColor/ButtonPressedColor. If images are larger than the applet, only the central portion of the image will be visible.

NOTE - Using Images:  For best results, set the Button3D parameter to 'no' to prevent bright outlines appearing above or below the image. The default setting for each of the three parameters above is NO IMAGE, allowing you to use images at only one or two of the three possible stages. Because the three image-stages work in parallel with the three Button-Color stages, it's possible to use the same GIF image with transparency for each stage, and rely on your different buttoncolor settings to make subtle changes to the appearance of the button.

Font
A comma-delimited string giving the name, style and size of the font you want to use for the Label. The default settings are Helvetica, in bold, at size 13, which would be written as Helvetica,bold,13. 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.

FontOverStyle
You can optionally change the style of the Font used when the mouse moves over the button. By default, the fontstyle will remain the same as specified in your Font parameter. To change it to something different, include this parameter with one of these non-case-sensitive values: plain, bold, italic, bolditalic.

FontDownStyle
YOu can also change the style of the font when the mouse clicks the button. Again, by defualt the fontstyle will remain the same as the style set in your Font parameter. The four possible values are the same as those given in the parameter above.

Label
The text you want to appear on the button when unfocussed. The default is no text. How the text will be displayed will depend upon its length (ie. whether it requires more than one line at your chosen applet width), and the settings you choose for the AutoWrap and Align parameters. Of course, if you wish to use TextButton Professional simply as a 3-stage image button, you can remove this parameter along with parameters relating to the font and text-color, alignment and wrapping.

FocusLabel
The text that should appear on the button when focussed (the mouse enters the applet). By default this will be the same as your Label; to keep the same button-label visible when the button is focussed, therefore, just leave this parameter out. The FocusLabel will take the color specified in your LabelFocusColor parameter. If you'd prefer to have no text shown when the button is focussed, include this parameter, but don't include any text between the double-quotes for the value.

PressedLabel
The text that should appear on the button when clicked. By default this will be the same as your Label; to keep the same button-label visible when the button is clicked, therefore, just leave this parameter out. The PressedLabel will take the color specified in your LabelPressedColor parameter. If you'd prefer to have no text shown when the button is pressed, include this parameter, but don't include any text between the double-quotes for the value.

LabelColor
A hex-triplet setting the color of the label text when unfocussed (the mouse isn't over it). The default is 000000 (black).

LabelFocusColor
The color of the label text when focussed (the mouse is over it). The default is FFFFFF (white).

LabelPressedColor
The color of the label text when the button is depressed. The default is 000000 (black).

3D
An option to use a 3D effect for the button-label when the mouse is over (or pressing) the button. The default value is Off (no effect). There are three options that can be used to 'turn on' the feature: Color allows the applet to derive its own color for the 3D effect based on your selections for LabelFocusColor and LabelPressedColor; in this mode, if you used black text for either option, TextButton will use gray for the 3D effect. The Color mode is recommended as the best place to start. With some combinations of text/button colors, the Color mode will make the text hard to read (an example is LabelFocusColor 0000FF, ButtonColor 008000). To get around this, two further modes are available: LightGray and DarkGray. These allow you to choose one of two shades of gray to add effect without obscuring the text. The sacrifice you make in these modes, however, is that the same shade of gray will be applied to both your LabelFocusColor and LabelPressedColor (that's why we suggest you start with Color mode!).

NOTE: As usual, this parameter is not case sensitive. You can enter COLOR, or color, or even cOLoR.

Align
Sets the alignment of text on the button when your Label consists of multiple lines. (With AutoWrap turned off and a single line of text entered as a label, TextButton will ignore your Align setting and center the label both horizontally and vertically. If you wish to adjust the alignment of a single-line label, turn on AutoWrap and adjust the Margin parameters below.) The options for the Align parameter are center, right or left, once again not case-sensitive. The default is center.

LeftMargin
Sets the width of the button's left margin, in pixels. The default is 10. Increasing this will force left-aligned text to begin closer to the center of the button. If your text is aligned to the center, increasing this value will move it further to the right (ie. off-center).

RightMargin
Sets the width of the button's right margin, in pixels. The default is 10. Increasing this value will move right-aligned text further to the left.

TopMargin
The height of the button's top margin (ie. the distance from the top of the applet at which the first line of text will be placed, when your text consists of more than one line). The default is 20. Some experimentation will be required as different font-sizes will need differing amounts of 'headroom' for a clean display.

Delimiter
With the AutoWrap function switched off, a very long Label might just vanish off the side of your button (unless you've got a very long button too!). You can force this label to wrap onto new lines by entering a delimiter symbol at those places where you want a line break to occur. This parameter lets you choose the symbol you want to use for the job. By default, the pipe symbol | is used. The only reason you'd want to change this is if you need to use this symbol as part of the displayed text on the button, which seems unlikely to happen. Therefore, this parameter can almost always be left out.

Here's a quick example of using the delimiter to wrap text yourself (after turning off AutoWrap):

This piece of text|wraps to the next line|wherever the pipe symbol|appears.| |You can even miss out lines!

which would look like this (assuming that Align is set to 'left'):

This piece of text
wraps to the next line
wherever the pipe symbol
appears.
 
You can even miss out lines.

Note that if you want to miss out a line, you must enter a space between the two delimiters (as shown above). If a delimiter symbol is used and no printable character follows it, the applet will give error messages and get all sulky.

AutoWrap
The options are yes or no, and the value is not case-sensitive. The default is no. Setting the value to yes will wrap your Label onto new lines, based on the size of the font you chose and the current applet width (less a fixed 10-pixel margin left and right). If AuroWrap is switched on, the Delimiter parameter is ignored; if you happen to include your chosen delimiter symbol somewhere in the label, it will simply be printed on the button along with the other text. To create a simple button-label consisting of a single-line of text, set the AutoWrap parameter to no (or leave it out entirely), and adjust the height and width of the applet to suit the size of font and length of text - the label will automatically be centered horizontally and vertically on the button. (Yes, TextButton is smart enough to know what to do when you enter just a single line of text!)

Sound
Specifies whether or not you'd like the applet to play sounds in response to mouse movement and clicks. A value of yes turns the sound option on, a value of no turns it off. Neither is case-sensitive. The default value is no, which means that you can also leave the Sound parameter out if you don't want to use sounds. The inclusion of this yes/no option allows you to use sounds on one instance of the applet without having to use it on all if you have several TextButtons on a page. With this parameter set to 'yes', you'll need to specify which sound to use, via the four following parameters.

SoundButtonDown
Specifies the path (if necessary) and name of the Sun/NeXT format (.au) audio file to be played when the TextButton is clicked. The location of the file is treated exactly as a URL: you might enter only a filename (if the file is in the current directory), a relative location (such as ../sounds/daftsound.au) or an absolute location (such as http://www.server.com/folder/subfolder/daftsound.au). See the note about Using Sounds, below.

SoundButtonUp
Specifies the path (if necessary) and name of the audio file to be played when the TextButton is released. The same details apply to this parameter as apply to SoundButtonDown, of course. See the note about Using Sounds, below.

SoundButtonEnter
Specifies the path (if necessary) and name of the audio file to be played when the mouse enters the button. See the note about Using Sounds, below.

SoundButtonExit
Specifies the path (if necessary) and name of the audio file to be played when the mouse moves out of the button. See the note about Using Sounds, below.

NOTE - Using Sounds: TextButton Professional is forgiving in its sound-support. If you set the Sound parameter to 'yes', and then forget to include one or more of the four parameters above (or forget to upload the audio files!), TextButton Professional will continue quite happily (but silently). This means that if you choose to use fewer than the four possible sounds, you can simply remove their parameters and TextButton will play sounds only for the events that have a parameter.

UseHandCursor
A yes or no parameter that determines whether or not a typical 'web-style' hand cursor is used when the mouse moves over the button. The default value is yes, so you need include this parameter only if you want to set it to 'no' and stick to the default pointer. This feature is applied only when an applet is running in a Java 1.1-compatible browser (Internet Explorer 4x or higher, Netscape Navigator 4.07 or higher). In other browsers, this parameter is ignored and the default pointer will be used.

URL1, URL2, URL3, URL4
The URL(s) of up to 4 Web pages or other resources you want the applet to fetch when clicked. Any of these may be absolute URLs (http://www.doctors.co/operate) or relative URLs (../../MyPage.htm). If you wish to link to fewer than the maximum 4 files, simply leave out the unnecessary URL parameters and their corresponding Target parameters.

When using more than a single URL parameter, bear in mind that these parameters are processed in numerical order. In most cases, this will make no difference. However, it does become important if you wish to change the contents of the frame containing the button: this must be the last URL to be processed! If, for example, you were using all four parameters, and trying to load something over the TextButton frame in URL2, the files referenced by URL3 and URL4 would not be loaded because TextButton would have been stopped before these parameters could be processed.

Note 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.

As an aid to color, image and sound testing, you can prefix or replace your URL parameters' values with the dollar sign $ to prevent TextButton Professional linking anywhere when clicked.

Target1, Target2, Target3, Target4
A text-string specifying the name of the frame or window in which you want the correspondingly-numbered URL to be opened. The default is _top. Remember that frame/window names are case-sensitive. If you specify a name that doesn't match that of a current frame or window, a new window will be opened and assigned this new name.

Message
A text-string you want displayed in the browser's status-bar when the mouse passes over the button, usually giving some clue to the linked page. The default is blank (no message displayed).


































.