JDAnimate: Animation with sound Applet

  This is a simple animation applet. You specify a list of files that contain each frame of animation, how long to display each frame for, and a "*.au" file that has the soundtrack. The first frame is displayed until the user clicks on the applet, it then cycles through the rest of the frames and retuns to the first frame.
Example of APPLET code: <APPLET CODE="JDAnimate.class" WIDTH=62 HEIGHT=59> <param name="frameNames" value="pumpkin-f1.gif,pumpkin-f2.gif,pumpkin-f3.gif,pumpkin-f4.gif,pumpkin-f5.gif,pumpkin-f6.gif"> <param name="frameRate" value="75"> <param name="soundTrack" value="laugh.au"> </APPLET>
Parameters:
 frameNames
   Is a list of the image files names separated by commas.
 frameRate
   Is the rate to play the frames in milliseconds (1000 = 1 second).
 soundTrack
   Is the *.au file to play during animation. If you don't have a soundTrack
   use "" as the soundTrack parameter.

Here's an example:

Click the Pumpkin-->

How to use:

  Copy the Java JDAnimate.class file to the same directory on your web server as the HTML page that is going to call it. Also put the animation image files, and sound file to the same directory If you want to copy the Pumpkin exampe above here are the image and sound files: pumpkin-f1.gif , pumpkin-f2.gif , pumpkin-f3.gif , pumpkin-f4.gif , pumpkin-f5.gif , pumpkin-f6.gif , laugh.au

Source Code:

The source: JDAnimate.java

Back to John Donohues's Java Examples Homepage
  Back to John Donohues's Homepage
Questions or Comments to:  
Last Updated 09/28/97