Captain JavaWe are sorry to tell you that 'Captain Java', from whom we obtained this applet, died in August 2005. His website is no longer functioning. To allow you to obtain the Dorian Gray II applet; Captain Java's Web pages about this applet have been reproduced in slightly modified form here for you.

To get the Dorian Gray II class file you will need click this link

The Dorian Gray Applet II - Parameters and examples

Reflection from images - Html syntax

Example:
Attention the non breaking space in the second line ( )
is optional. You need it to alinge the applet and the image if you arenot using tables. Sometimes you need it, sometimes you don't - depending

on your layout. Hint: before the   close any open font tags.

<center><img src="image.jpg" width="189" height="201">
<br / >
&nbsp;
<applet code="DorianGray_II.class" width="189" height="210" / >

<param name="image" value="woman.jpg" / >
<param name="bgcolor" value="000000" / >
<param name="loadtext" value="Loading reflection" / >
<param name="textcolor" value="ff0000" / >
<param name="mode" value="0" / >
<param name="speed" value="0" / >
<param name="frames" value="0" / >
<param name="status" value="Welcome to the Dorian Gray Applet II" / >
<param name="outtext" value="Mail me if you like it ..." / >
<param name="intext" value="
Click me, and you might hear something..." / >
<param name="text" value="Hey, why are you clicking me ?" / >
<param name="sound" value="evillaugh.wav" / >
<param name="href" value="http://www.jaydax.co.uk/tutorials/" / >
<param name="target" value="_self" / >
Sorry. You must have a Java enabled browser to see the effect.
</applet>
</center>

Attention: the href parameter disables the sound parameter !

Woman
 

Of course there's no reason you can't reflect a different image:

Example:
In this example the image at the top is different to the image reflected


<center>
<img height=189 alt="Woman" src="woman.jpg" width=272>
<br / >
&nbsp;
<applet height=189 width=272 code=DorianGray_II.class>
<param name="href" value="DorianGrayIIApplet.htm">
<param name="image" value="vamp.jpg">
<param name="mode" value="0">
<param name="sound" value="evillaugh.wav">
</applet>
</center>

Attention: the href parameter disables the sound parameter !

exampl_n1.jpg (16065 bytes)
 

 

The main parameters

<applet code="DorianGray_II.class" width="272" height="189">
The applet code. If you have it at another adress you can add a codebase="http://whatever.com".
The size should be the same width as your picture, but 50 pixels less in height. you should edit your
picture so you would have at least a 50 pixel high zone at the top in background color. (you'll understand
why if you dont. I'll fix the bug in version III. (As MS says, its not a bug, its a feature)

<param name="image" value="picture.jpg">
The image name... gif or jpg supported. See upper paragraph for sizing.
If you want to reflect a picture like in the example above, you put it straight with the extra 50 pixels above.
if you want it like in the examples below, you flip it around, (with the head down). You add the 50 pixels above
again - after you have flipped it.

<param name="bgcolor" value="000000">
This is the background color while your applet is loading.. default is black.

<param name="loadtext" value="Loading reflection">
This is the text that appears while the image is loading.. default is:"loading reflection"

<param name="textcolor" value="ff0000">
This is the color of the text that appears before image is loading.. default is: red

 

The   6 reflection modes

<param name="mode" value="0">
If no mode parameter is specified, default is mode is mode=0 (no parameter tag required)

mode = 0
mode = 1
mode = 2
mode = 3
mode = 4
mode = 5

 

The speed and frames parameter

<param name="speed" value="3"> (possible 1 to 5)
If no speed parameter is specified, default is mode is speed = 3 (no parameter tag required)

<param name="frames" value="12"> (possible 9 to 14)
If no frames parameter is specified, default is mode is frames = 12 (no parameter tag required)

All the examples are  in reflexion mode = 2

You can mix frames and speed but the more frames you use the longer the applet needs to initialize.
you should turn the framerate as low as possible and then adjust the speed.

frames = 9
frames = 11
frames = 14
speed = 1
speed = 5
speed = 2

 

The status bar messages

<param name="status" value="Welcome to the Dorian Gray Applet II">
The status parameter sets the statusbar message when the applet is loaded the first time.
default : "Welcome to the Dorian Gray Applet II
"

<param name="outtext" value="Mail me if you like it ...">
The outtext parameter sets the status bar message when the mouse leaves the applet.
default: "Mail me if you like it ...."

<param name="intext" value="Click me, and you might hear something...">
The intext parameter sets the status bar message when the mouse is over the applet.
default: "Click me, and you might hear something..."

Attention this is disabled if the href parameter exists. It is automatically replaced by the URL

<param name="text" value="Hey, why are you clicking me ?#?!...">
The intext parameter sets the status bar message when the mouse is clicking the applet.
default: "Hey, why are you clicking me ?#?!..."

Attention this is disabled if the href parameter exists. It is not replaced because you leave the applet very quickly.

 

The sound support

<param name="sound" value="sound.au">
The DorianGrayApplet supports *.au sounds. The sound is deactivated if the href parameter is specified. Why? Because
I experienced some problems on slow servers. To get the sound to work, follow the instructions below:
1. to create a sound file take a wave file of your choice.>
2. load it in a sound editor. I use Goldwave. It's shareware and you can get it at tucows (http://www.tucows.com).
3. go to the menu "effects" and choose "resample". resample the file to 8khz (8000hz).
4. goto the "file" menu choose "save as".
5. Select in "Save file as type": Sun ( *.au)
6. IMPORTANT: Then select in "file attributes" (beneeth): ylaw mono (version 3.03) or "web" or "java" for
higher versions that don't have the uLaw setting anymore.!
When troubelshooting, make shure you have resampled to 8000Hz or 8kHZ. There is a 5000Hz setting that makes the file smaller
but it doesn't work!
7. Write the exact path to your parameter value. The filename only means it is in the same directory. Recomended.

 

The href parameters

<param name="href" value="http://yourserver.com/the_link_page.html">
You can specify a link with this parameter. Using the parameter disables sound and the text when you click the applet and
the text when you do a "mouse over". The link is displayed instead so people would know it is really a link and not just
a message.

<param name="target" value="_self">
This parameter displays the link in a specified target frame. (_self, _top etc...) default is "_self"