Face - a Java Freeware mini-applet

by John Criswick, The Internet Conveyor Ltd.


Introduction

Downloading and Using Face

Feedback - Fine Print

Another Example of Usage

Introduction

Face lets you create a very simple cell animation. Its called Face because my first idea was to animate someone's face, but you could animate anything you like I guess.... Face also plays a sound (pretty well) in synchronization with the animation. Applet size is only 4,821 bytes!


You will need a Java capable browser to see the cat that goes behhhhh.

Apologies to my cat.

Also, see here for another example.


Downloading and Using Face

To use the applet: download it, place it in an appropriate location, add the applet tag to your document, and please add
this line to your page.

To download the class file Face.class select one of the following links:

Make sure the file Face.class after downloading is 4821 bytes in size. Also make sure your server is configured to serve .class files as MIME type application/octet-stream.

People typically place applets in a classes directory at the same level as the HTML document in which the applet resides. In the case here, the class file is at the same level as the HTML file so no codebase parameter in the applet tag is required.

The applet tag for the above applet looks like:

  <applet code="Face" width=146 height=175>
  <param name=image value="cat-head.gif">
  <param name=cell value="behhhh.gif">
  <param name=offtime value=3000>
  <param name=ontime value=400>
  <param name=sound value="uuuu.au">
  <param name=x value=67>
  <param name=y value=121>
  <img src="cat-head.gif"><p>
  <font size=-1>You will need a Java capable browser to see the
  cat that goes behhhhh.</font><p>
  </applet>
You must specify the width and height of the applet exactly according to the size of the main image you are using.

Parameter Usage

image

This is the relative or absolute URL of the image file that is to be the main image displayed.

cell

This is the relative or absolute URL pointing to the image file to be used in the animation. For example in the cat animation my cell image looks like:

x

The horizontal coordinate within the main image where the cell image is to be drawn.

y

The vertical coordinate within the main image where the cell image is to be drawn.

ontime

This is the duration in milliseconds (1000 = 1 second) for the main image to be displayed without the added cell image. You may need to adjust these two times in order for the sound to be played properly, e.g. in its duration.

offtime

This is the duration in milliseconds for the cell image to be displayed. It is at the start of this time that the sound is played also.

sound

This is the relative or absolute URL pointing to the sound file. Make sure it is in the correct format for Java to play (Sun/AU uLaw). For an example, the sound used in the above applet is here.

That should do it.

If you use this applet, please place the following line at the bottom of your page (feel free to reduce the font size in order to remain compatible with your page!):

<font size=-1>Face applet (c) <a href="http://www.conveyor.com/">
The Internet Conveyor Ltd.</a></font>


Let me know where you are using the applet so I can set up a page of links. Questions or comments to: John Criswick by e-mail to criswick@conveyor.com.

This applet is Freeware, no warranty is implied in any sense. Use at your own risk.

More Freeware applets can be found here!

The Internet Conveyor Ltd.