November 17 1998

Documentation for the LaserApplet
copyright 1998 by Peter Hellmann



a) Source code of member function "getParameterInfo()":

   
// Parameter info for LaserApplet.

public String[][] getParameterInfo()
{
  String[][] info =
    {
      {"bg-color",            "int,int,int",    "red,green,blue"},
      {"banner",              "URL",            "image that will be drawn by laser"},
      {"banner-x-pos",        "int",            "x position of banner"},
      {"banner-y-pos",        "int",            "y position of banner"},
      {"banner-top-os",       "int",            "banner frame width top"},
      {"banner-bottom-os",    "int",            "banner frame width bottom"},
      {"banner-left-os",      "int",            "banner frame width left"},
      {"banner-right-os",     "int",            "banner frame width right"},
      {"laser-origin-x-pos",  "int",            "x pos of laser origin"},
      {"laser-origin-y-pos",  "int",            "y pos of laser origin"},
      {"laser-origin-region", "int,int,int,int","x,y,width,height of region (only used if laser-origin-type = RANDOM"},
      {"laser-origin-type",   "string",         "valid types are: FIXED or RANDOM"},
      {"laser-x-step",        "int",            "x increment of laser x-pos"},
      {"laser-y-step",        "int",            "y increment of laser y-pos"},
      {"laser-type",          "string",         "type of laser: NATURAL or COLOR or RAINBOW"},
      {"laser-beam-color",    "int,int,int",    "red,green,blue (only used if laser-type COLOR)"},
      {"laser-spot-color",    "int,int,int",    "red,green,blue (can be -1,-1,-1 to be set automatic)"},
      {"laser-beam-spot-aspekt","double",       "any value between 0.01 and 1 (only used if laser-spot-color is set automatic"},
      {"laser-beam-hue-increment","double",     "any value between 0.001 and 0.49 (only used if laser-type is RAINBOW"},
      {"thread-sleep",        "int",            "value between 1 and 1000 (milliseconds)"},
      {"sequence-sleep",      "int",            "value between 1 and 20 (seconds)"},
      {"link-url",		      "string",			"URL to link to"},
	  {"link-target-frame",	  "string",			"URL link target frame (default: _top)"},
    };
  return info;
}

d) HTML example

<applet code="LaserBanner.class" width=700 height=200>
<param name="bg-color" value="0,0,0">
<param name="banner" value="mybanner.jpg">
<param name="banner-x-pos" value="0">
<param name="banner-y-pos" value="0">
<param name="banner-top-os" value="0">
<param name="banner-bottom-os" value="0">
<param name="banner-left-os" value="0">
<param name="banner-right-os" value="0">
<param name="laser-origin-x-pos" value="400">
<param name="laser-origin-y-pos" value="180">
<param name="laser-origin-region" value="0,80,700,100">
<param name="laser-origin-type" value="RANDOM">
<param name="laser-x-step" value="1">
<param name="laser-y-step" value="2">
<param name="laser-type" value="NATURAL">
<param name="laser-beam-color" value="255,0,0">
<param name="laser-spot-color" value="-1,-1,-1">
<param name="laser-beam-spot-aspekt" value="0.25">
<param name="laser-beam-hue-increment" value="0.005">
<param name="thread-sleep" value="10">
<param name="sequence-sleep" value="20">
<param name="link-url" value="http://www.mylinkurl.com">
<param name="link-target-frame" value="_top">
<hr>
Oh dear - no Java!!!! Get some <a href="http://www.microsoft.com/ie">here</a>
Oh dear - no Java!!!! Get some <a href="http://www.netscape.com">here</a>
<br>
</applet>

c) Parameter description

   "bg-color"

   Sets the background color of the applet. Red, Green and Blue values can be in range
   from 0 to 255. The laser beam will never have the color, set as the background color.
   We recommend to set the bg color to "0,0,0", which is black, cause usually a laser
   beam is not black. However all colors are possible. For transparent effects, set the
   bg color to the same color as your background of the used image. 

   "banner"
   
   Name or URL of the image, the laser banner should draw. This can be a GIF or JPG file.

   "banner-x-pos"

   x-position within the applet client area, where the banner image will appear. Keep in
   mind to set the applet "width" and "height" values large enough to hold and place the
   banner image. We recommend to make a "frame" around the banner image, by specifying
   applet "width" and "height" bigger as the banner image. The area "outside" of the image,
   is a good place to set the laser beam "origin" anyway.

   "banner-y-pos"

   y-position within the applet client area, where the banner image will appear.

   "banner-top-os"

   Offset of laser drawing region to top of banner image. Set to "0" if not needed. When a
   image is used, the text or picture the laser should draw, can be a sub-region of the
   laser image, when this parameter is used. 


   "banner-bottom-os"

   Offset of laser drawing region to bottom of banner image. Set to "0" if not needed. When a
   image is used, the text or picture the laser should draw, can be a sub-region of the
   laser image, when this parameter is used. 

   "banner-left-os"

   Offset of laser drawing region to left side of banner image. Set to "0" if not needed. When a
   image is used, the text or picture the laser should draw, can be a sub-region of the
   laser image, when this parameter is used. 

   "banner-right-os"

   Offset of laser drawing region to right side of banner image. Set to "0" if not needed. When a
   image is used, the text or picture the laser should draw, can be a sub-region of the
   laser image, when this parameter is used. 

   "laser-origin-x-pos"

   x-position of laser within applet client area. 

   "laser-origin-y-pos"

   y-position of laser within applet client area. 

   "laser-origin-region"

   x-position,y-position,width and height of laser origin area. This parameter is only
   used, when laser-origin-type is set to "RANDOM". The laser origin will then move to
   a random position within the specified area, each time the banner image is drawn new.   

   "laser-origin-type"

   If set to "FIXED", the laser origin will always stay at the position, specified in
   parameter "laser-origin-x-pos" and "laser-origin-y-pos". If set to "RANDOM", the laser
   will move within the area specified in parameter "laser-origin-region", each time the
   banner image is drawn new.

   "laser-x-step"

   Specifies x-movement of laser in increments. We recommend to set to 1 or 2. Remember that
   the laser doesn't draw between "gaps". However the higher the value, the faster the laser.

   "laser-y-step"

   Specifies y-movement of laser in increments. We recommend to set to 1 or 2. Remember that
   the laser doesn't draw between "gaps". However the higher the value, the faster the laser.

   "laser-type"

   Can be "NATURAL", "COLOR" or "RAINBOW". When set to NATURAL, laser will always have color
   of destination pixel of banner image (except color of set background color).
   When set to "COLOR", the laser will have a fixed color, specified with parameter
   "laser-beam-color". When set to "RAINBOW", laser beam color will cycle by given hue
   increment (parameter "laser-beam-hue-increment"). 

   "laser-beam-color"

   Color, laser will have, when "laser-type" is set to "COLOR". Color is defined with Red,
   Green and Blue values.

   "laser-spot-color"

   Can be set to "-1,-1,-1", to automatically calculate the laser spot color. The laser spot
   color is the color of the last pixel of the laser beam. The applet will try to calculate
   a "brighter" color for the laser spot, based on the laser beam color. However you can set
   a fixed color, by specifying RGB values.

   "laser-beam-spot-aspekt"

   Aspekt of laser spot color to laser beam color. Can be any value between 0.01 and 1. This
   parameter is only used, when parameter "laser-spot-color" is set to "-1,-1,-1".

   "laser-beam-hue-increment"
   
   Can be any value between "0.001" and "0.49". This parameter is only used, if "laser-type"
   is set to "RAINBOW". The higher the value, the faster the color will cycle through the
   color spectrum.


   "thread-sleep"

   Value between "1" and "1000". The lower the value, the faster the laser is drawing.

   "sequence-sleep"

   Value between "1" and "20". The lower the value, the shorter the time it will take,
   until the laser draws the banner image again.


   "link-url"
   
   Your favorite link URL when u klick on banner
   
   "link-target-frame"
   
   Your target frame for the above link (defaults to "_top") 





