Lake free applet
by
David Griffiths
www.demon.co.uk/davidg/spigots.htm
The Lake free 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
java applet parameters
<applet
code=Lake.class
id=Lake
width=392
height=380 >
<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>
|
java applet explanation
To use the Lake free java applet, I
- Step 1: Downloaded Lake.zip and extracted into my web page directory. IMPORTANT: All file and folder names must be preserved exactly as zipped.
- Step 2: 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 java 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
![[ CLICK HERE for free applets ]](free-applets.gif)
www.Free-Applets.com
Last updated: