3QuarksAppletsPictureButtonParameter
Deutsch
The PictureButton can be adapted and customized to all possible requests using thirteen possible parameters. This example, a bell with a sensitive area, demonstrates the use of all thirteen parameters. However, only a few parameters are normally required for most applications.

Please note that a click on the bell button opens a new window with the 3Quarks-Homepage. If you want to hear only the ringing, then click on the bell button, keeping the mouse button pressed and pull the mouse pointer out of the sensitive area.

   Please activate Java!


  <applet code=PictureButton.class name=Doorbell width=213 height=58>
    <param name=BackgroundColor value="99,99,99">
    <param name=BackgroundImage value="3Quarks.jpg">
    <param name=LinkUrl value="http://www.3quarks.com">
    <param name=LinkTarget value="_blank">
    <param name=LinkApplet value="Dummy">
    <param name=LinkDelay value="1000">
    <param name=LinkMessage value="Visit 3Quarks...">
    <param name=LinkArea value="15,14,47,14,47,45,15,45">
    <param name=ImagePosition value="9,7">
    <param name=NormalImage value="Bellpush-normal.gif">
    <param name=MouseOverImage value="Bellpush-mouseover.gif">
    <param name=MouseDownImage value="Bellpush-mousedown.gif">
    <param name=MouseDownSound value="Ring.au">
  </applet>
ParameterBackgroundColor
  <param name=BackgroundColor value="99,99,99">
  <param name=BackgroundColor value="#636363">


With the parameter "BackgroundColor" you can configure the background color of the applet. The color is specified either by using a comma separated string with values for red, green and blue or alternatively using the hexadecimal HTML format "#rrggbb." When the button is initially displayed, the background is filled as fast as possible with this color. Even if the applet uses a background image, a background color should be always specified. Otherwise the applet default background color (light-grey) appears first.
ParameterBackgroundColor
  <param name=BackgroundImage value="3Quarks.jpg">

The optional background picture of the applet is set by the parameter "BackgroundImage." The value specifies the file name of the background picture. The currently supported image formats are GIF and JPG. If the applet is larger than the picture, then the applet is tiled using the picture. In such cases so-called seamless tiles should be used. If the applet is smaller, then the background picture is truncated on the right and bottom sides.
3Quarks 3Quarks.jpg
213 × 58 pixel
ParameterLinkUrl
  <param name=LinkUrl value="http://www.3quarks.com">

With the parameter "LinkUrl" you indicate the link of the PictureButton. In the example this is the 3Quarks-Homepage. You can use absolute and relative addresses or branch also to an anchor on your own page or to another page.
ParameterLinkTarget
  <param name=LinkTarget value="_blank">

If you want to render the reference in a certain HTML frame, then you can use the parameter "LinkTarget." The argument is the name of the HTML frame, in which the reference target is rendered. If this parameter is missing, then the reference is rendered in the current frame of the browser. You can use also the following pre-defined values:
_blank Renders the link in a new, unnamed window.
_self Renders the link in the current frame (useful for overriding a BASE TARGET).
_parent Renders the link in the immediate FRAMESET parent.
_top Renders the link in the full, unframed window.
ParameterLinkApplet
  <param name=LinkApplet value="Dummy">

With the help of the parameter "LinkApplet" you can communicate with a second applet on the same HTML page, so-called interapplet communication. The PictureButton looks for an applet with a specified name. In the example the applet "Dummy" is specified and upon location a message is transmitted to it. As argument the message contains the name of the source PictureButton, here the button is called "Doorbell."

Please note that the example parameter is show only as an illustration and hence has no real meaning, since no applet with the name "Dummy" exists on this HTML page. The example traffic light shows three PictureButtons using interapplet communication. Here you find additional information of interest to programmers.
ParameterLinkMessage
  <param name=LinkMessage value="Visit 3Quarks...">

With the parameter "LinkMessage" you can specify a short text message. This text is displayed in the status line of the browser, when the mouse is over the applet or the sensitive area of the applet. If you do not use this parameter, then the referenced link is displayed in the status line.
ParameterLinkDelay
  <param name=LinkDelay value="1000">

If you want to delay loading of the link, then you can specifiy this with the parameter "LinkDelay." The numeric value indicates the delay time in units of milliseconds. This is usefull for example, even if you use the parameters MouseDownImage or MouseDownSound. By an appropriate delay you guarantee that the picture remains some time or that the sound is played completely before the new page appears at the browser.
ParameterLinkArea
  <param name=LinkArea value="15,14,47,14,47,45,15,45">

This parameter is used, in order to define a sensitive area in the applet. The Button reacts then only to mouse clicks within this area. A list of XY coordinates is used to describe a polygon which defines this sensitive area. The coordinates are relative to the left upper corner of the applet. If the parameter "LinkArea" is not used, then the entire applet is sensitiv. In this example a rectangle with the coordinates (15,14), (47,14), (47,45) and (15,45) is used as a sensitive area. Hence, the PictureButton reacts only on clicks on the bell button.
LinkArea
ParameterImagePosition
  <param name=ImagePosition value="9,7">

With the parameter "ImagePosition" you determine the position for the pictures "NormalImage," "MouseOverImage" and "MouseDownImage" in the applet. All values refer to the left upper corner of the applet. If this parameter is not used, then the pictures are centered in the applet.
ParameterNormalImage
  <param name=NormalImage value="Bellpush-normal.gif">

With the parameter "NormalImage" the picture for the normal display is specified. This image as well as the other images may be specified in either GIF or JPG format. Transparent GIF's are supported. This parameter is optional. If it is missing, then only the applet background is displayed, but the complete functionality is useable.
Bellpush-normal.gif
45 × 44 pixel
ParameterMouseOverImage
  <param name=MouseOverImage value="Bellpush-mouseover.gif">

This parameter specifies a picture for the "mouse over button" status. It is displayed whenever the mouse is over the applet or in the sensitive area. If this parameter is missing, then the "NormalImage" is displayed.
Bellpush-mouseover.gif
45 × 44 pixel
ParameterMouseDownImage
  <param name=MouseDownImage value="Bellpush-mousedown.gif">

With this parameter you can specify a picture for the pressed state. It is displayed whenever the user presses the mouse button over the applet or in the sensitive area. If this picture is missing, then the picture MouseOverImage described below is used. If you use a picture for the pressed status, then you should use also specify the parameter LinkDelay. Using a delay you guarantee that the picture remains visible a certain minimum amount of time, before the new link appears in the Browser.
Bellpush-mousedown.gif
45 × 44 pixel
The link is only activated if the user releases the mouse button over the sensitive area. This procedure differs from usual HTML references, which load the link when the user initially presses the mouse button.
ParameterMouseDownSound
  <param name=MouseDownSound value="Ring.au">
  <param name=MouseDownSound value="Ring.au,safety">


With the parameter "MouseDownSound" you can assign an audio file to the PictureButton. This is played, if the mouse button over the applet or the sensitive area is pressed. You should use this parameter in combination with LinkDelay. With this delay you guarantee that the audio file is played before the reference is loaded. Currently, the Java API supports only the Sun AU format (8 bits, µlaw, 8000 Hz, one-channel).
Play Ring.au
The second version is relevant only for Microsoft Windows 95/98. On this world-wide leading operating system, repeated playing of audio clips can lead to an system crash. By the specification of the keyword "safety" the sound output below Windows 95/98 is suppressed. You can find further information to this error on the start page of the PictureButtons in the section of problems.
May 21, 2000