home *** CD-ROM | disk | FTP | other *** search
/ Boot Disc 9 / boot-disc-1997-05.iso / GroovyBox / source.txt < prev    next >
Text File  |  1997-03-13  |  881b  |  31 lines

  1. public boolean mouseEnter(Message msg, Event evt, int x, int y)
  2. {
  3. Applet ourApplet = getApplet();
  4.     AudioClip clip;
  5.     String clipFilename = null;
  6.  
  7.     // If the mouse is entering any of our Image Labels, we play
  8.     // a sound that has nothing to do with the image.
  9.     // Confusion is Entertainment!
  10.     if (msg.target == gui.alien)
  11.         clipFilename = "mix.au";
  12.     else if (msg.target == gui.thatgirl)
  13.         clipFilename = "gEEk.au";
  14.     else if (msg.target == gui.disc)
  15.         clipFilename = "powerchord.au";
  16.     else if (msg.target == gui.mrbrad)
  17.         clipFilename = "hahaha.au";
  18.     else if (msg.target == gui.baby)
  19.         clipFilename = "picking.au";
  20.     else if (msg.target == gui.bootnet)
  21.         clipFilename = "whatEVer.au";
  22.  
  23.     if (clipFilename != null)
  24.     {
  25.         clip = ourApplet.getAudioClip(ourApplet.getDocumentBase(), clipFilename);
  26.         clip.play();
  27.     }
  28.  
  29.     return super.mouseEnter(msg, evt, x, y);
  30. }
  31.