Learn Java: Java Applets: AnimatedAd2 applet
Developer's Daily Java Applets
  front page | java | perl | unix | DevDirectory
Front Page
The "AnimatedAd" applet - version 2.0

Description - new version

AnimatedAd2 is based on our original AnimatedAd applet. Please see that page for a complete description of how this applet got started.

AnimatedAd2 differs from the original AnimatedAd in two primary ways. First, when the user places their mouse over the ad, the animation stops, and the random text follows the cursor as the user moves it. Second, AnimatedAd2 writes the same text to the status line of the user's browser.

The intent of this applet is to show how Java ads can be different and improve upon animated GIF images.


The AnimatedAd2 applet lets you control the following parameters through HTML "param" tags:

  • Mouse tracking new!
  • Writing to the browser status line new!
  • The background color
  • Text strings to display
  • An array of possible font colors
  • An array of possible font styles
  • An array of possible font sizes
  • The time to pause between displays of the strings
  • The time to pause after the main string
  • The number of times the flashing words should appear
  • Min and max coordinates for the text strings
  • The X-Y coordinates for the final string
  • The URL to go to when the applet is clicked

See it in action

Click here to see the new AnimatedAd2 applet in action

Java source code and class files

The source code for the AnimatedAd2 applet is available!

The source code for the applet consists of two files that you should download:

If you'd rather just download the class files, you can download those by clicking on these links:

HTML source code

You can also click here to view/save a sample HTML page that invokes the AnimatedAd2 applet. This page provides a listing of the many parameters that can be modified to make the AnimatedAd2 look and work the way you want it to. (Remember to save the file with a .html filename extension on your web server.)

Copyright 1998 DevDaily Interactive, Inc.
All Rights Reserved.