ALERT!! Windows XP SP2 <<<< makes these Lake applets look like this
Since Microsoft XP released Service Pack 2, the Lake.class applet will not work correctly!
To avoid the problem, STOP USING the
Lake.class file and begin using the newer
lake.class file that is available here:
In the instructions below, replace the Lake with lake!
(The lowercase letter and the newer class file really matter!)
|
|
Instructions included with these:
|
More moving water examples:
|
TEST 1: Original Lake and variations
TEST 2: Liberty boat of sailors coming to shore
(with intricate large overlay)
NOTE: this page will take some time to load!
|
(these have visual only no detail instructions)
[Applet: Lake]
|
TEST 1: Lake (original)
This test sample is an updated version and several variations of KW's Tutorial #13 shown here: Tutorial List
Credits: David Griffiths wrote the applet and
Kevin Weilbacher modified the code
that goes with it to work in Trellix/CSB.
IMPORTANT: The Lake.class offered on Java Script Kit site will not work with this set of instructions. Here is the correct version:
(update: see Windows XP SP2 notice above before downloading. Recommend the other file!)
Download image here:
|
Take a plain image:
![]() And transform it into:
|
This is a sample of David Griffith's original code:
<applet code=Lake.class id=Lake width=392 height=380 >
<param name=image value="dusk.gif">
<param name=href value="http://www.javascriptkit.com">
</applet>
NOTE: if you are NOT using CSB or TRELLIX to build your site:
1. Adjust your image size as discussed in step 1 below
2. Use the code ABOVE instead of the code shown in step 2, just changing the image size and name.
3. FTP your image and class file to your site.
4. Publish.
|
1. Adjust image size:
Use a photo program to check pixel size. Width stays the same.
Height of image increased: multiply by 1.9 Ex: height is 199 199 x 1.9 = 378.1 = rounded to 380 pixels
Use your calculated height in the inserted HTML code
|
|
CSB User: Insert > HTML is same as Trellix Webgem!
![]() 2. Insert the code: into Webgem (Insert > HTML)
CSB User: still use ^GEMDIR in code!
<applet code="Lake" codebase=^GEMDIR width=392 height=380>
<param name="image" value="^GEMDIR/dusk.gif">
<param name="href" value="http://www.lambertusa.com">
</applet>
NOTE: Items in red are changed to match yours
(not using CSB or Trellix to build your site? read this)
|
CSB User: Files for this component is same as Gem Files!
![]() 3. Insert both files into Gem files (Webcomponent)
Make sure capitalization is same as you used in the code (step 2)! This step eliminates the need to FTP your files to your site!
4. Publish!
|
NOTE: if using frames, the link will load in current frame unless you add:
<param name="target" value="_top"> (added to variation 2)
or to open in a new window, add:
<param name="target" value="_blank"> (added to variation 3)
|
|
Add items in blue for a tight border around image:
<center><table border=5 cellspacing=0 cellpadding=0><tr><td>
<applet code="Lake" codebase=^GEMDIR width=392 height=380>
<param name="image" value="^GEMDIR/dusk.gif">
<param name="href" value="http://www.lambertusa.com">
</applet></td></tr></table></center>
NOTE: Items in red are changed to match yours
|
Add items in blue for a tight border around image
& item in red allows you to add an image on top of the original picture
& item in light blue breaks frame on link:
<center><table border=7 cellspacing=0 cellpadding=0><tr><td>
<applet code="Lake" codebase=^GEMDIR width=392 height=380>
<param name="image" value="^GEMDIR/dusk.gif">
<param name="overlay" value="^GEMDIR/grumpy.gif">
<param name="target" value="_top">
<param name="href" value="http://www.lambertusa.com">
</applet></td></tr></table></center>
NOTE: Items in red are changed to match yours
grumpy.gif image is 100 x 95 pixels and automatically centers on overlay
|
item in red allows you to add an image on top of the original picture
& item in light blue opens into a new window on link:
<applet code="Lake" codebase=^GEMDIR width=392 height=380>
<param name="image" value="^GEMDIR/dusk.gif">
<param name="target" value="_blank">
<param name="href" value="http://www.lambertusa.com">
<param name="overlay" value="^GEMDIR/seagrapes.gif">
</applet>
NOTE: Items in red are changed to match yours
seagrapes.gif image is 392 x 395 pixels and automatically centers on overlay
overlay image: The seagrape leaves were manually cut out of another image, placed into a transparent image which was expanded longer than the overall applet so all edges would be covered, other wise top edge of dusk would show above seagrapes. Done through the trial and error method tweaking until the final image was satisfactory.)
|
REFERENCE AND COMPARISON:
|
NOT AVAILABLE FOR DOWNLOAD: (for example only)
|
<applet code=Lake.class id=Lake width=392 height=380 >
<param name=image value="dusk.gif">
<param name=href value="http://www.javascriptkit.com">
</applet>
NOTE: if you are NOT using CSB or TRELLIX to build your site, use his code, and FTP your image and class file to your site!
|
<applet code="Lake" codebase=^GEMDIR width=392 height=380>
<param name="image" value="^GEMDIR/dusk.gif">
<param name="href" value="http://www.lambertusa.com">
</applet>
|
Just the background (top) of image and water:
Full image with boat overlay:
And to really feel like you are on the boat taking you to shore, add a rocking motion.
Hope you don't get seasick.
The applet will not allow control the height of the swells.
(There is another applet that allows the waves to be adjusted, but not the rocking motion)
This technique would work better on a stormy shot with waves.
Click either animated images to go to the site dedicated to USS Rankin (AKA-103)
Here's the original photo used with permission for this tutorial:
![]() HOW IT WAS DONE:
![]() ![]()
Follow the same instructions as shown in the LAKE example above, modify the HTML code to fit your image dimensions, load the Lake.class and images into an Insert HTML (webgem in Trellix) and publish your page. Study it for problems.
1. the overlay image came up to high on the mountain. I made the image CANVAS larger (not the picture). For purposes of this web page, I added a slight border so you can see the full size of the expanded image. The area at the top is actually empty canvas but shows up better on this demo if colored. By adding extra space at the top of the photo, the boat will hit the the background image approximately the same height as the original photo. This is not an exact science and must be adjusted according to the photo you are using. It took me two tries to get it the way I wanted.
I filled in the space with the color that represents transparent. (need help with transparency, check out this tutorial)
2. The edges on the boat seemed to rough, jagged when placed as an overlay. I went back to the now expanded photograph and cleaned/recolored pixels so they would not be shiny against the background areas. The resulting tweaks are shown below, the image was saved to a new name each time I adjusted: (hard to see difference unless laid against the background image)
This step may be done a few times to get the image where, and how you want it. Personal choice.
Depends on how picky you are and how difficult the background/foreground image is to work with.
|
||||||||||||||||||||||||||||||||||||
*Note: the calculation for how large the water is basically 163 x 1.9= 310
But this can be adjusted to have more water by adding a few pixels (I added 10 for a bit more water)
(not as dramatic as the liberty boat, but the second is pretty good)
|
||||||||||||||||||||||||||||||||||||