Home Page
What's New
About Me
Penguins
Applets
Links
CV
Email Me

Goldfish

Source code now available for download!

The little fish will swim after the mouse whenever the mouse is over the applet. It will even leap out of the water if you lead it correctly.

This applet is FREE to use for NON-COMMERCIAL web sites only - if you would like to use it on a commercial web site then contact me by email to discuss payment.

For non commercial web pages then download the fish.zip file and extract all of the files. Then place:

<APPLET CODE=c archive=obf_goldfish.jar WIDTH=320 HEIGHT=240>
<param name="bowlcentre_x" value ="160.0">
<param name="bowlcentre_y" value ="145.0">
<param name="bowlradius" value ="124.0">
<param name="watertop" value = "60.0">
<param name="waterbottom" value ="205.0">
<param name="leftlip" value = "65.0">
<param name="rightlip" value ="255.0">
<param name="round" value ="true">
</APPLET>

in your HTML wherever you want the fish to appear. You can change the graphics and the parameters to make the bowl appear however you want it to be - they work as follows:

  • bowlcentre_x - this is the x coordinate of the centre of the bowl
  • bowlcentre_y - this is the y coordinate of the centre of the bowl
  • bowlradius - this is the radius of the bowl (if using a round bowl)
  • watertop - this is the y coordinate of the top of the water
  • waterbottom - this is the y coordinate of the bottom of the water
  • leftlip - this is the x coordinate of the left opening of the bowl
  • rightlip - this is the x coordinate of the right opening of the bowl
  • round - if set to "true" then it uses a round bowl using the radius, if set to "false" then it uses a rectangular bowl using the lip coordinates.

You can also download the original Java source code and change it to your heart's desire (as long as you keep the notice at the top of the source files intact, and place an appropriate notice next to any uses of the code that it is based on my work).

If you do use it then please email me with your website's address and any comments on the applet that you have. Cash donations always welcome!

More Applets by me



Document last modified - 5th January 2005