Listing One


//覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧
覧覧
// HyperText: Dynamic Hyperlink for Text
// Copyright 1996, All rights reserved
// Version: 1.0
// Author: Chris Howard
// Created: 3/30/96
//覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧
覧覧
//
// This applet jazzes up your HyperLinks. All parameters are optional. The 
// possible parameters are:
//
//   TEXT               Text to display                       (def: "HyperText")
//   EFFECT             Effect to make text "Hyper"           (def: NORMAL)
//     = NORMAL           Looks like a normal, underlined link
//     = BLINK            Blinks between FGCOLOR and BGCOLOR
//     = COLOR            Alternates between FGCOLOR and EFCOLOR
//     = BOLD             Alternates between normal and bold styles
//     = OUTLINE          Outlines text in effect color          
//     = JUMPY            Letters jump around
//   MOUSEONLY          Show effect only when mouse in applet (def: NO)
//     = YES or TRUE 
//   HOLDSTEADY         Hold effect steady (for COLOR, BOLD)  (def: NO)
//     = YES or TRUE 
//   SPEED              Speed of animation, in milliseconds   (def: 100)
//   FONT               Font name                             (def: Courier)
//   FONTSIZE           Font size                             (def: 12)
//   FGCOLOR            Foreground color                      (def: black)
//   BGCOLOR            Background color                      (def: background)
//   EFCOLOR            Effect color for COLOR effect         (def: red)
//   TARGET             Target window to open URL             (def: none)
//   URL                URL to link to when link is selected  (def: none)
//   SOUNDIN            Sound to play when mouse is in applet (def: none)
//   SOUNDSEL           Sound to play when link is selected   (def: none)
//
// You should also place a normal hyperlink within the APPLET tag. This will
// ensure that browsers without Java support will still see your link.
//
// HyperText does not have to be a hyperlink. You can use it to animate
// text, and optionally play an audio file if it is selected.
//
// Examples:
//
// <! Simple >
// <APPLET CODE=HyperText.class WIDTH=50 HEIGHT=20>
// <PARAM NAME="TEXT"   VALUE="Hit Me!">
// <PARAM NAME="EFFECT" VALUE="BLINK">
// <PARAM NAME="URL"    VALUE="http://www.myweb.com">
// <A HREF="http://www.myweb.com">Hit Me!</A>
// </APPLET>
//
// Some things to try:
//
// [] Add an AUTOSIZE parameter that will size up/down the applet window
//    so that it surrounds the text nicely. That way, if you change the font,
//    you won't have to resize the applet window.
//                    
//覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧
覧覧

// Import classes    
import java.awt.*;
import java.net.URL;
import java.net.MalformedURLException;
import java.applet.AudioClip;
import java.applet.Applet;

// Main applet
public class HyperText extends java.applet.Applet implements Runnable {

  // Parameters
  String      parm;
  String      parmText;
  int         parmEffect;
  boolean     parmMouseOnly, parmHoldSteady;
  int         parmSpeed;
  String      parmFontName;
  int         parmFontSize;
  Color       parmForeColor, parmBackColor, parmEffectColor;
  String      parmTarget;
  URL         parmURL;
  AudioClip   parmSoundIn, parmSoundSel;

  // Main thread
  Thread      thread = null;

  // Update toggle
  boolean     toggle = false;

  // Mouse is in applet region
  boolean     mouseIn;

  // Text characters
  char        textChars[];

  // Text fonts
  Font        textFont, textFontBold;
  FontMetrics textFontMetrics;

  // Text position
  int         textX, textY;
  
  // Offscreen image
  Image       offscreenImage;
  Graphics    offscreenGraphics;

  //覧覧//

  // Applet Info
  public String getAppletInfo() {
    return "HyperText 1.0 (c) 1996 by Chris Howard";
  }
  
  //覧覧//
                
  // Parameter Info
  public String[][] getParameterInfo() {
    String[][] info = {
      {"TEXT",       "String",    "Text to display"},                       
      {"EFFECT",     "String",    "Effect to make text 'Hyper'"},           
      {"MOUSEONLY",  "Boolean",   "Show effect only when mouse in applet"}, 
      {"HOLDSTEADY", "Boolean",   "Hold effect steady (for COLOR, BOLD)"},  
      {"SPEED",      "Integer",   "Speed of animation, in milliseconds"},   
      {"FONT",       "String",    "Font name"},                             
      {"FONTSIZE",   "Integer",   "Font size"},                             
      {"FGCOLOR",    "Color",     "Foreground color"},                      
      {"BGCOLOR",    "Color",     "Background color"},                      
      {"EFCOLOR",    "Color",     "Effect color for COLOR effect"},         
      {"TARGET",     "String",    "Target window to open URL"},             
      {"URL",        "URL",       "URL to link to when link is selected"},  
      {"SOUNDIN",    "AudioClip", "Sound to play when mouse is in applet"}, 
      {"SOUNDSEL",   "AudioClip", "Sound to play when link is selected"},  
    };
    return info;
  }

  //覧覧//
  
  // Parses a string into a Color
  Color ParseColor(String s) {

    int r, g, b;
  
    // String should be six chars long, RRGGBB
    if (s.length() >= 6) {
      // Get individual strings
	   String sr = s.substring(0, 2);
	   String sg = s.substring(2, 4);
	   String sb = s.substring(4, 6);
      // Convert to integers
      r = (sr == null) ? 0 : Integer.parseInt(sr, 16);
      g = (sg == null) ? 0 : Integer.parseInt(sg, 16);
      b = (sb == null) ? 0 : Integer.parseInt(sb, 16);
    }
    else {
      // Use gray
      r = g = b = 128;
    }
    // Return color
    return new java.awt.Color(r, g, b);
  }
    
  //覧覧//
    
  // Class initialization code...and retrieve applet parms
  public void init() {
  
    // Text
    if ((parmText = getParameter("TEXT")) == null) {
      parmText = "HyperText";
    }
    // Separate characters
    textChars = new char [parmText.length()];
    parmText.getChars(0, parmText.length(), textChars, 0);
    
    // Effect type...assume normal
    parmEffect = 0;
    if ((parm = getParameter("EFFECT")) != null) {
      // Decode it
      if (parm.equalsIgnoreCase("BLINK")) 
        parmEffect = 1;
      else if (parm.equalsIgnoreCase("COLOR"))
        parmEffect = 2;
      else if (parm.equalsIgnoreCase("BOLD"))
        parmEffect = 3;
      else if (parm.equalsIgnoreCase("OUTLINE"))
        parmEffect = 4;
      else if (parm.equalsIgnoreCase("JUMPY"))
        parmEffect = 5;
    }
    
    // Mouse activated
    parm = getParameter("MOUSEONLY");
    parmMouseOnly = (parm == null) ? false : (parm.equalsIgnoreCase("yes") ||
                                              parm.equalsIgnoreCase("true"));
    // Hold effect steady
    parm = getParameter("HOLDSTEADY");
    parmHoldSteady = (parm == null) ? false : (parm.equalsIgnoreCase("yes") ||
                                               parm.equalsIgnoreCase("true"));
    // Speed                                         
    parm = getParameter("SPEED");
    parmSpeed = (parm == null) ? 1000 : Integer.parseInt(parm);
    
    // Font name
    parm = getParameter("FONT");
    parmFontName = (parm == null) ? "Courier" : parm;

    // Font size
    parm = getParameter("FONTSIZE");    parmFontSize = (parm == null) ? 12 : 
Integer.parseInt(parm);
    // Foreground text color    parm = getParameter("FGCOLOR");
    parmForeColor = (parm == null) ? Color.black : ParseColor(parm);
    
    // Applet background color
    parm = getParameter("BGCOLOR");
    parmBackColor = (parm == null) ? getBackground() : ParseColor(parm);

    // Effect color
    parm = getParameter("EFCOLOR");
    parmEffectColor = (parm == null) ? Color.red : ParseColor(parm);
                   
    // Target
    parmTarget = getParameter("TARGET");
    
    // URL
    if ((parm = getParameter("URL")) != null) {
      try { 
        parmURL = new URL(parm);
      } catch (MalformedURLException e) {
        System.out.print("Malformed URL: ");
        System.out.println(parm);
      }
    }

    // Sound In
    parm = getParameter("SOUNDIN");
    if (parm != null) {
      parmSoundIn = getAudioClip(getCodeBase(), parm);
    }  
        
    // Sound Selected
    parm = getParameter("SOUNDSEL");
    if (parm != null) {
      parmSoundSel = getAudioClip(getCodeBase(), parm);
    }  
        
    // We want to draw offscreen, for flickerless display
    offscreenImage = createImage(size().width, size().height);
    offscreenGraphics = offscreenImage.getGraphics();

    // Create and set our fonts
    textFont = new Font(parmFontName, Font.PLAIN, parmFontSize);
    textFontBold = new Font(parmFontName, Font.BOLD, parmFontSize);
    offscreenGraphics.setFont(textFont);

    // Get the font metrics
    textFontMetrics = getFontMetrics(textFont);
    
    // Determine text position (center string in applet window)
    textX = (size().width-textFontMetrics.stringWidth(parmText))/2;
    textY = (size().height)/2;

  }

  //覧覧//
  
  // Program start
  public void start() {
    if (thread == null) {
      // Start another thread on this object);
      thread = new Thread(this);
      // Will ultimately cause a separate thread to call the run method
      thread.start();
    }
  }

  //覧覧//
  
  // Program stop
  public void stop() {
    if (thread != null) {
      // Stop sounds
      if (parmSoundIn  != null) parmSoundIn.stop();
      if (parmSoundSel != null) parmSoundSel.stop();
      // Stop us
      thread.stop();
      thread = null;
    }
  }

  //覧覧//
  
  // Mouse enters Java applet region handling code
  public boolean mouseEnter(Event e, int x, int y) {
    // Set flag that mouse is in region
    mouseIn = true;
    // Show destination
    if (parmURL != null) {
      showStatus(parmURL.toString());
    }
    // Update (forces animate if in region)
    repaint();
    // Play sound, if present
    if (parmSoundIn != null) {
      parmSoundIn.play();
    }

    return true;
  }
  
  //覧覧//
  
  // Mouse exits Java applet region handling code
  public boolean mouseExit(Event e, int x, int y) {
    // Mouse is no longer within applet
    mouseIn = false;
    // Clear status line
    showStatus("");
    // Update (stops animation if necessary)
    repaint();

    return true;
  }
  
  //覧覧//
  
  // Mouse button pressed handling code
  public boolean mouseDown(Event e, int x, int y) {
    // Play sound, if present
    if (parmSoundSel != null) {
      parmSoundSel.play();
    }
    // Do we have a URL to go to?
    if (parmURL != null) {
      // Do we have a target?
      if (parmTarget != null) {
        // Yes, so use it
        getAppletContext().showDocument(parmURL, parmTarget);
      }  
      else {
        // No, so just go
        getAppletContext().showDocument(parmURL);
      }  
    }
    return true;       
  }

  //覧覧//
  
  // This allows us to update off screen
  public void update(Graphics g) {

    // Clear background
    offscreenGraphics.setColor(parmBackColor);
    offscreenGraphics.fillRect(0, 0, size().width, size().height);

    // Determine effect
    switch (parmEffect) {
      case 5:        
        // Jumpy effect
        int i, x, y;
        offscreenGraphics.setColor(parmForeColor);
        if (!parmMouseOnly || mouseIn) {
          // Start at left edge
          x = textX;
          // Display each char in string, moving them +-4 pixels randomly
          for (i=0; i<parmText.length(); i++) {
            y  = (int) (Math.random()*4 + textY);
            offscreenGraphics.drawChars(textChars, i, 1, x, y);
            x += (int) (Math.random()*4) + textFontMetrics.charWidth(textChars[i]);
          }   
        }
        else {
          // Just draw the string normally
          offscreenGraphics.drawString(parmText, textX, textY);
        }  
        break;
      case 4:        
        // Outline effect
        offscreenGraphics.setColor(parmEffectColor);
        offscreenGraphics.setFont(textFont);
        if ((!parmMouseOnly || mouseIn) && (parmHoldSteady || toggle)) {
          // Create outline by moving string one pixel in each direction
          offscreenGraphics.drawString(parmText, textX-1, textY-1);
          offscreenGraphics.drawString(parmText, textX-1, textY);
          offscreenGraphics.drawString(parmText, textX-1, textY+1);
          offscreenGraphics.drawString(parmText, textX,   textY-1);
          offscreenGraphics.drawString(parmText, textX,   textY);
          offscreenGraphics.drawString(parmText, textX,   textY+1);
          offscreenGraphics.drawString(parmText, textX+1, textY-1);
          offscreenGraphics.drawString(parmText, textX+1, textY);
          offscreenGraphics.drawString(parmText, textX+1, textY+1);
        }                                                
        // Draw the normal string whether outline exists or not
        offscreenGraphics.setColor(parmForeColor);
        offscreenGraphics.drawString(parmText, textX, textY);
        break;                                             
      case 3:        
        // Bold effect
        offscreenGraphics.setColor(parmForeColor);
        offscreenGraphics.setFont(textFont);
        if ((!parmMouseOnly || mouseIn) && (parmHoldSteady || toggle)) {
          offscreenGraphics.setFont(textFontBold);
        }
        offscreenGraphics.drawString(parmText, textX, textY);
        break;                                             
      case 2:
        // Color effect
        offscreenGraphics.setColor(parmForeColor);
        if ((!parmMouseOnly || mouseIn) && (parmHoldSteady || toggle)) {
          offscreenGraphics.setColor(parmEffectColor);
        }
        offscreenGraphics.drawString(parmText, textX, textY);
        break;                                             
      case 1:
        // Blink effect
        offscreenGraphics.setColor(parmForeColor);
        if ((!parmMouseOnly || mouseIn) && toggle) {
          offscreenGraphics.setColor(parmBackColor);
        }
        offscreenGraphics.drawString(parmText, textX, textY);
        break;                                             
      default:
        // Draw normal string
        offscreenGraphics.setColor(parmForeColor);
        offscreenGraphics.drawString(parmText, textX, textY);
        // Add underline, if URL is present
        if (parmURL != null) {
          offscreenGraphics.drawLine(textX, textY+2, 
textX+textFontMetrics.stringWidth(parmText), textY+2);
        }  
    }                                                      

 
    // Copy everything to visible graphics
    g.drawImage(offscreenImage, 0, 0, null);
  }

  //覧覧//
  
  // This routine handles the painting
  public void paint(Graphics g) {
    if (offscreenGraphics != null) {
      g.drawImage(offscreenImage, 0, 0, this);
    }
  }
  
  //覧覧//
  
  // Implements Runnable Interface
  public void run() {
    // This method is called when a new thread is started (care of Runnable interface)
    while (thread != null) {
      try {
        Thread.sleep(parmSpeed);
      } catch (InterruptedException e);
      repaint();
      toggle = !toggle;
    }
  }

} // end class HyperText



Listing Two



<!覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧
覧覧
  HyperText: Dynamic Hyperlink for Text Applet HTML Test Page
  Copyright 1996, All rights reserved
  Version: 1.0
  Author: Chris Howard
  Created: 3/30/96
覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧
覧->

<TITLE>The HyperText Applet</TITLE>
<HR>
<P>

<APPLET CODE=HyperText.class WIDTH=200 HEIGHT=200>
<PARAM NAME="TEXT"       VALUE="HyperText!">
<PARAM NAME="EFFECT"     VALUE="JUMPY">
<PARAM NAME="FONT"       VALUE="TimesRoman">
<PARAM NAME="FONTSIZE"   VALUE="36">
<PARAM NAME="FGCOLOR"    VALUE="FF0000">
<PARAM NAME="BGCOLOR"    VALUE="FFFFFF">
<PARAM NAME="EFCOLOR"    VALUE="0000FF">
<PARAM NAME="MOUSEONLY"  VALUE="FALSE">
<PARAM NAME="HOLDSTEADY" VALUE="FALSE">
<PARAM NAME="SPEED"      VALUE="100">
<PARAM NAME="URL"        VALUE="http://www.webtechniques.com">
<PARAM NAME="SOUNDIN"    VALUE="clickme.au">
<PARAM NAME="SOUNDSEL"   VALUE="tigger.au">
<A HREF="http://www.webtechniques.com">HyperText!</A>
<P>
You need a Java-enabled browser in order to see this applet. Sorry.
</APPLET>
<P>
<HR>
<HR>
<A HREF="HyperText.java">The HyperText Java source</A>



Listing Three



<!覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧
覧覧
  HyperTextExample: Dynamic Hyperlink for Text Example HTML Page
  Copyright 1996, All rights reserved
  Version: 1.0
  Author: Chris Howard
  Created: 3/30/96
覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧
覧->

<! For bookmarking, etc, give us a meaningful title >
<TITLE>The HyperText Applet</TITLE>

<! Nice page header >
<CENTER>
<APPLET CODE=HyperText.class WIDTH=450 HEIGHT=60>
<PARAM NAME="TEXT"       value="The HyperText Applet">
<PARAM NAME="EFFECT"     value="JUMPY">
<PARAM NAME="FONT"       value="Helvetica">
<PARAM NAME="FONTSIZE"   value="36">
<PARAM NAME="FGCOLOR"    value="8800FF">
<PARAM NAME="SPEED"      value="250">
<! This header is for those without a Java-enabled browser >
<H1><B>The HyperText Applet</B></H1>
</APPLET>
<P>

<! Give myself some credit :) >
<APPLET CODE=HyperText.class WIDTH=200 HEIGHT=35>
<PARAM NAME="TEXT"       value="by Chris Howard">
<PARAM NAME="EFFECT"     value="JUMPY">
<PARAM NAME="FONT"       value="Helvetica">
<PARAM NAME="FONTSIZE"   value="16">
<PARAM NAME="MOUSEONLY"  value="TRUE">
<PARAM NAME="SPEED"      value="250">
<H3>by Chris Howard</H3>
<P>
<! Explain to non-Java users why this page looks so boring to them >
If you can read this, it means your browser does not support
<A HREF="http://www.javasoft.com>Java</A>. Since this page was designed to show
off the HyperText Java Applet, it's not going to be very interesting to you.
Come back with a Java-enabled browser like
<A HREF="http://www.netscape.com">Netscape Navigator 2.0</A> and have some fun.
<P>
</APPLET>
<P>

<! This is the main table so we can show off the applet, and explain it >
<TABLE BORDER=1 WIDTH=90%>

<! Nice, strong, table headers >
<TR><TD><STRONG><CENTER>Applet</CENTER></STRONG></TD>
<TD><STRONG>Comments</STRONG></TD></TR>

<! Start simple...text only >
<TR><TD>
<APPLET CODE=HyperText.class WIDTH=200 HEIGHT=100>
<PARAM NAME="TEXT"       value="Really Simple">
Really Simple
</APPLET></TD>
<TD>This is about as simple as it gets. This uses all of the defaults
except the TEXT parameter. Not much use, really.</TD>
</TR>

<! Build slowly...this has a URL >
<TR><TD>
<APPLET CODE=HyperText.class WIDTH=200 HEIGHT=100>
<PARAM NAME="TEXT"       value="WebTechniques">
<PARAM NAME="EFFECT"     value="NORMAL">
<PARAM NAME="FGCOLOR"    value="0000DD">
<PARAM NAME="URL"        value="http://www.webtechniques.com">
<A HREF="http://www.webtechniques.com">WebTechniques</A>
</APPLET></TD>
<TD>This is just a little more. It looks and acts just like a normal URL link.
Useful, but not anything you can't do with just plain HTML.</TD>
</TR>

<! Getting fancy...using an effect and font >
<TR><TD>
<APPLET CODE=HyperText.class WIDTH=200 HEIGHT=100>
<PARAM NAME="TEXT"       value="Red Alert!">
<PARAM NAME="EFFECT"     value="BLINK">
<PARAM NAME="FONT"       value="Helvetica">
<PARAM NAME="FONTSIZE"   value="24">
<PARAM NAME="FGCOLOR"    value="DD0000">
<PARAM NAME="URL"        value="http://www.webtechniques.com">
<A HREF="http://www.webtechniques.com">Red Alert!</A>
</APPLET></TD>
<TD>Now we are getting somewhere...the blink effect with a font and fontsize.
Blinking can be annoying, so you can change this so that the text blinks only
when the mouse is over the applet. See the MOUSEONLY parameter, illustrated
toward the bottom of the table.
</TD>
</TR>

<! Color Effect >
<TR><TD>
<APPLET CODE=HyperText.class WIDTH=200 HEIGHT=100>
<PARAM NAME="TEXT"       value="Colors">
<PARAM NAME="EFFECT"     value="COLOR">
<PARAM NAME="FONT"       value="TimesRoman">
<PARAM NAME="FONTSIZE"   value="36">
<PARAM NAME="FGCOLOR"    value="DD0000">
<PARAM NAME="EFCOLOR"    value="0000DD">
<PARAM NAME="URL"        value="http://www.webtechniques.com">
<A HREF="http://www.webtechniques.com">Colors</A>
</APPLET></TD>
<TD>The COLOR effect, similar to blinking, but the text alternates between two
colors.
</TD>
</TR>

<! Bold Effect >
<TR><TD>
<APPLET CODE=HyperText.class WIDTH=200 HEIGHT=100>
<PARAM NAME="TEXT"       value="Bold & Beautiful">
<PARAM NAME="EFFECT"     value="BOLD">
<PARAM NAME="FONT"       value="Courier">
<PARAM NAME="FONTSIZE"   value="12">
<PARAM NAME="FGCOLOR"    value="DD00DD">
<PARAM NAME="URL"        value="http://www.webtechniques.com">
<A HREF="http://www.webtechniques.com">Bold & Beautiful</A>
</APPLET></TD>
<TD>The BOLD effect bolds the text periodically. It is less obtrusive than
blinking. It's probably best used with MOUSEONLY, though.
</TD>
</TR>

<! Outline Effect >
<TR><TD>
<APPLET CODE=HyperText.class WIDTH=200 HEIGHT=100>
<PARAM NAME="TEXT"       value="Fun!">
<PARAM NAME="EFFECT"     value="OUTLINE">
<PARAM NAME="FONT"       value="TimesRoman">
<PARAM NAME="FONTSIZE"   value="48">
<PARAM NAME="FGCOLOR"    value="FFFFFF">
<PARAM NAME="BGCOLOR"    value="00CCCC">
<PARAM NAME="EFCOLOR"    value="000000">
<PARAM NAME="URL"        value="http://www.webtechniques.com">
<A HREF="http://www.webtechniques.com">Fun!</A>
</APPLET></TD>
<TD>You can outline text in any color for extra emphasis. Plus, with any effect,
you can specify a background color for the applet.
</TD>
</TR>

<! Jumpy, with faster Speed >
<TR><TD>
<APPLET CODE=HyperText.class WIDTH=200 HEIGHT=100>
<PARAM NAME="TEXT"       value="Wild & Crazy!">
<PARAM NAME="EFFECT"     value="JUMPY">
<PARAM NAME="FONT"       value="TimesRoman">
<PARAM NAME="FONTSIZE"   value="24">
<PARAM NAME="FGCOLOR"    value="DD5500">
<PARAM NAME="SPEED"      value="200">
<PARAM NAME="URL"        value="http://www.webtechniques.com">
<A HREF="http://www.webtechniques.com">Wild & Crazy!</A>
</APPLET></TD>
<TD>The JUMPY effect is similar to NervousText, except it is double-buffered
for flickerless display. It can also be a link, which makes it much more useful.
Here I've also sped up the update to keep things moving.
</TD>
</TR>

<! Mouse Only >
<TR><TD>
<APPLET CODE=HyperText.class WIDTH=200 HEIGHT=100>
<PARAM NAME="TEXT"       value="Wild & Crazy!">
<PARAM NAME="EFFECT"     value="JUMPY">
<PARAM NAME="FONT"       value="TimesRoman">
<PARAM NAME="FONTSIZE"   value="24">
<PARAM NAME="FGCOLOR"    value="DD5500">
<PARAM NAME="SPEED"      value="200">
<PARAM NAME="MOUSEONLY"  value="TRUE">
<PARAM NAME="URL"        value="http://www.webtechniques.com">
<A HREF="http://www.webtechniques.com">Wild & Crazy!</A>
</APPLET></TD>
<TD>Here is the same JUMPY effect, except we've set MOUSEONLY=TRUE. Try 
moving
your mouse over the applet and see what happens, and then move it off again.
</TD>
</TR>

<! Blink with MOUSEONLY >
<TR><TD>
<APPLET CODE=HyperText.class WIDTH=200 HEIGHT=100>
<PARAM NAME="TEXT"       value="Make Me Blink...">
<PARAM NAME="EFFECT"     value="BLINK">
<PARAM NAME="FONT"       value="Helvetica">
<PARAM NAME="FONTSIZE"   value="24">
<PARAM NAME="FGCOLOR"    value="DD0000">
<PARAM NAME="MOUSEONLY"  value="TRUE">
<PARAM NAME="SPEED"      value="250">
<PARAM NAME="URL"        value="http://www.webtechniques.com">
<A HREF="http://www.webtechniques.com">Make Me Blink...</A>
</APPLET></TD>
<TD>You can use the MOUSEONLY parameter for the other effects as well. For
instance, here is BLINK again.
</TD>
</TR>

<! Hold Steady >
<TR><TD>
<APPLET CODE=HyperText.class WIDTH=200 HEIGHT=100>
<PARAM NAME="TEXT"       value="IMPORTANT">
<PARAM NAME="EFFECT"     value="OUTLINE">
<PARAM NAME="FONT"       value="TimesRoman">
<PARAM NAME="FONTSIZE"   value="24">
<PARAM NAME="FGCOLOR"    value="FFFFFF">
<PARAM NAME="EFCOLOR"    value="000000">
<PARAM NAME="MOUSEONLY"  value="TRUE">
<PARAM NAME="HOLDSTEADY" value="TRUE">
<PARAM NAME="URL"        value="http://www.webtechniques.com">
<A HREF="http://www.webtechniques.com">IMPORTANT</A>
</APPLET></TD>
<TD>If you don't like the blinking, just specify HOLDSTEADY=TRUE along with the
MOUSEONLY parameter. Move your mouse over the text to see what happens now.
</TD>
</TR>

<! Sound >
<TR><TD>
<APPLET CODE=HyperText.class WIDTH=200 HEIGHT=100>
<PARAM NAME="TEXT"       value="Click Me!">
<PARAM NAME="EFFECT"     value="JUMPY">
<PARAM NAME="FONT"       value="TimesRoman">
<PARAM NAME="FONTSIZE"   value="24">
<PARAM NAME="FGCOLOR"    value="8844EE">
<PARAM NAME="SPEED"      value="200">
<PARAM NAME="MOUSEONLY"  value="TRUE">
<! Thanks to Paul Fruia for these au sound files! >
<PARAM NAME="SOUNDIN"    value="clickme.au">
<PARAM NAME="SOUNDSEL"   value="tigger.au">
<PARAM NAME="URL"        value="http://www.webtechniques.com">
<A HREF="http://www.webtechniques.com">Click Me!</A>
</APPLET></TD>
<TD>And finally, you can add sound effects. The SOUNDIN parameter plays
a sound when the mouse moves into the applet, and the SOUNDSEL
parameter plays a sound when the link is selected. Try it!
</TD>
</TR>

</TABLE>

<! After all that, they just might want to get the source code >
<P>
<P>
<HR>
<P>
<APPLET CODE=HyperText.class WIDTH=350 HEIGHT=50>
<PARAM NAME="TEXT"       value="The HyperText Java Source">
<PARAM NAME="EFFECT"     value="JUMPY">
<PARAM NAME="FONT"       value="Courier">
<PARAM NAME="FONTSIZE"   value="16">
<PARAM NAME="FGCOLOR"    value="8800FF">
<PARAM NAME="SPEED"      value="200">
<PARAM NAME="URL"        value="file:HyperText.java">
<A HREF="HyperText.java">The HyperText Java Source</A>
</APPLET></TD>

</CENTER>