Lake Free Applet
by
David Griffiths
www.demon.co.uk/davidg
Lake applet takes any gif or jpg and puts it behind a virtual lake. The program has been deliberately kept very small and creates the frames of the
animation on the browser machine, transferring only the original image across the Net. This ensures the animation starts reasonably quickly on the page.
Click here to download:
Lake.zip
Lake.java
HTML Requirements
<applet
code=Lake.class
id=Lake
width=392
height=380 >
<PARAM NAME="Applet_Collection" VALUE="http://www.free-applets.com">
<param name=image value="dusk.gif">
<param name=overlay value="free-applets.gif">
<param name=href value="target.htm">
You don't have java! Why don't you get: <a href="http://www.microsoft.com/ie">Microsoft Explorer</a>
</APPLET>
|
Applet Explanation
To create the above Lake applet, I
- Downloaded Lake.zip and extracted into my web page directory.
- Viewed Lake.html with my java enabled browser.
Applet Parameters
-
image
-
This parameter specifies the horizon picture that will be reflected in the
lake.
-
overlay
-
You can use this parameter if you want a static picture to overlay the moving image of the lake. A good idea is to use a transparent .GIF for this so that you will not hide too much of the animation.
-
href
-
You can now use the applet as a hyperlink, by setting href to the name of the page you want to link to.
-
target
-
If you are using the applet as a hyperlink then you can set this value to specify the target frame. If you don't set a target value then the new page appear in the current frame.
The height of the applet should 2 * (height of the image) - (a little bit).
How much is a little bit? Well it depends upon the height of your original image. The
best thing to do is to start with the applet height = 2 *(height of the original) - 10, and then play around a bit after that. Older versions of the applet were always shortened by 10, but it's now more flexible to give better perspective on smaller images.
I would suggest you put the Lake.class file in the same directory as the page on which it will appear. If you want to move it elsewhere then use the CODEBASE option to point to the appropriate directory.
Some implementations of Java will not allow you to put the .class file in one subdirectory and the image file in another. If the try it might cause a security exception.
Click here for Notes: Making it Realistic
Free Java Applets Collection
www.free-applets.com
Last updated: