Fish Eye Applet
Created by RJHM van den Bergh
2000 , RJHM van den Bergh \ Comweb , All Rights Reserved.
support@comweb.nl
http://www.comweb.nl


DISCLAIMER: THE USE OF THIS APPLET IS AT YOUR OWN RISK !


Description:
This applet scrolls a picture horizontally.
There are several 3D effects possible.
Such as a fish eye or perspective drawing.
Parts of the picture can be made clickable
The mouse can control the picture movement , (horizontal and vertical)

How to use:
Add the applet tags to your html page.
Adjust the parameter tags.
Upload your panoramic picture.
Upload your html file.
Upload the FishEye.class file in the same directory as your html file.
Note class files need to be uploaded as binary files to prevent data corruption !

The applet tags:
<APPLET CODE="FishEye.class" WIDTH="192" HEIGHT="192">
<PARAM NAME="CABBASE" VALUE="fisheye.cab">
<PARAM NAME="picture" VALUE="cruzbay.jpg">
<PARAM NAME="background" VALUE="background.gif">
<PARAM NAME="x_add" VALUE="1">
<PARAM NAME="x_add_max" VALUE="2">
<PARAM NAME="y_add" VALUE="0">
<PARAM NAME="y_add_max" VALUE="2">
<PARAM NAME="bgcolor" VALUE="#FF0000">
<PARAM NAME="display_methode" VALUE="1">
<PARAM NAME="methode1_param1" VALUE="1.3">
<PARAM NAME="rect1" VALUE="FishEye.html:41,105,26,44">
<PARAM NAME="copyright" VALUE="RJHM van den Bergh , All Rights Reserved , rvdb@comweb.nl.">
<PARAM NAME="license_code" VALUE="comweb.nl|59776080">
</APPLET><BR>

Description of the applet tags:
<APPLET CODE="FishEye.class" WIDTH="192" HEIGHT="192">
Starting tag tells the applet file name , not the path , and the width and height in pixels.
Note: You can't set a path in the code attribute , it only tells the browser the applets file name.
The applet file FishEye.class is expected to be in the same directory as the html page.
Note the Applet size must be less or equal to the picture size !!

<PARAM NAME="CABBASE" VALUE="fisheye.cab">
This is just an optional file for a Explorer browser.
You don't need to use it.
But if you use it the applet will load faster with a Ms Explorer.
Don't then forget to upload the cab file also.

<PARAM NAME="picture" VALUE="cruzbay.jpg">
This parameter tells the applet which picture to load.
Applets do support jpg or gif files. 
This applet supports transparent gifs.

<PARAM NAME="background" VALUE="background.gif">
It is also possible to select a background pivture for the applet. 

<PARAM NAME="x_add" VALUE="1">
This is the starting speed at the x direction (horizontal).
If positive it will move from right to left.
If you want you can also set it to 0.

<PARAM NAME="x_add_max" VALUE="2">
This is the maximum speed the picture may move.
Movement is controlled by the mouse position.
If the mouse is at the center of the applet the picture will stop moving.
If its to the right the picture will move to the left.
If its to the left the picture will move right.

<PARAM NAME="y_add" VALUE="0">
This is the starting speed at the y axis. (vertical)
Note that the picture will only move vertical if it can.
This means the height of the picture must be more than the applet height.

<PARAM NAME="y_add_max" VALUE="2">
This is the same as x_add_max only for the vertical direction.
If the mouse is at top the picture will move down.
If the mouse is at the bottom the picture will move up.

<PARAM NAME="bgcolor" VALUE="#FF0000">
Of course you do want to set a back ground color.
With some of the effects for example the fish eye part of the
background will be visible.
The applet doesn't support color names only RGB representations.
Note: don't forget the leading # !

<PARAM NAME="display_methode" VALUE="1">
This is the 3D effect the applet performs.
1 a kind of perspective effect.
2 a fish eye (at least almost).
Probably I'll add more in the future.

<PARAM NAME="methode1_param1" VALUE="1.3">
Its possible to set some additional parameters for each method.
Currently there is only one for method 1.
Good values are from 0.1 to 2.5 .
The higher the value the more perspective.

<PARAM NAME="rect1" VALUE="FishEye.html:41,105,26,44">
<PARAM NAME="rect2" VALUE="http://www.comweb.nl|_top|200,80,40,50">
With these kind of parameters you can set clickable areas.
Only rectangles are supported.
They start with one and you can use as many as you like.
But they must be in successive order.
The basic structure of the parameter is:
url   target  x  y  width  height.
All are separated by a | : or ,
You can omit the target part as seen above with parameter rect1.
The target part is used to support html frames.
If you want to open the link into a new browser window use _blanc.

<PARAM NAME="load_message" VALUE="loading please wait">
This tag lets you change the loading message.
You also can omit the whole tag then a default message is displayed.

The color of this message is the reverse color of the background.

<PARAM NAME="copyright" VALUE="RJHM van den Bergh , All Rights Reserved , rvdb@comweb.nl.">
This is simply an copyright notice.
Don't remove or edit it otherwise the applet will refuse to run.

<PARAM NAME="license_code" VALUE="comweb.nl|59776080">
Used to check if the applet is licensed.
It does check it using the servers host name.
If its used locally from your hard disc the applet doesn't check its license.

</APPLET>
Quite simple the applet ending tag.
But don't forget it.


UPDATES :
Due to the design of the Java Virtual Machine on Macintosh the drawing was erratically
A fix was added.
According to documentation it should be fixed now.

BUGS:
The applet runs slow on older browsers like the Netscape 3.0
This is not a bug its just the newer browsers do work more efficient.
We are very interested in your bug reports.
Its practically impossible to test the applet on all browsers versions and operating systems.
SO IF YOU FIND A BUG PLEASE REPORT IT.
If you can please describe the bug as detailed as possible.
Browser version , operating system and or content of the Java console can be useful.
support@comweb.nl

Bug fixes:


RJHM van den Bergh
http://www.comweb.nl
All rights Reserved.