The Animator applet isn't finished -- we plan to add more features -- but we'd appreciate your suggestions. Send bug reports and feature requests to java@java.sun.com.
You can get a bunch of information about Animator by pressing the SHIFT key while clicking the mouse in an Animation.
<APPLET CODE="Animator.class" WIDTH="aNumber" -- the width (in pixels) of the widest frame HEIGHT="aNumber"> -- the height (in pixels) of the tallest frame <PARAM NAME="IMAGESOURCE" VALUE="aDirectory"> -- the directory that has the animation frames (a series of pictures in GIF or JPEG format, by default named T1.gif, T2.gif, ...) <PARAM NAME="STARTUP" VALUE="aFile"> -- an image to display at load time <PARAM NAME="BACKGROUND" VALUE="aFile"> -- an image to paint the frames against <PARAM NAME="BACKGROUNDCOLOR" VALUE="aColor"> -- a solid color to paint the frames against <PARAM NAME="STARTIMAGE" VALUE="aNumber"> -- number of the starting frame (1..n) <PARAM NAME="ENDIMAGE" VALUE="aNumber"> -- number of the end frame (1..n) <PARAM NAME="NAMEPATTERN" VALUE="dir/prefix%N.suffix" -- a pattern to use for generating names based on STARTIMAGE, ENDIMAGE, or IMAGES. (See below.) <PARAM NAME="PAUSE" VALUE="100"> -- milliseconds to pause between images default - can be overridden by PAUSES) <PARAM NAME="PAUSES" VALUE="300|200||400|200"> -- millisecond delay per frame. Blank uses default PAUSE value <PARAM NAME="REPEAT" VALUE="true"> -- repeat the sequence? <PARAM NAME="POSITIONS" VALUE="100@200||200@100||200@200|100@100|105@105"> -- positions (X@Y) for each frame. Blank means use previous frame's position <PARAM NAME="IMAGES" VALUE="3|3|2|1|2|3|17"> -- explicit order for frames - see below <PARAM NAME="SOUNDSOURCE" VALUE="aDirectory"> -- the directory that has the audio files <PARAM NAME="SOUNDTRACK" VALUE="aFile"> -- an audio file to play throughout <PARAM NAME="SOUNDS" VALUE="aFile.au|||||bFile.au"> -- audio files keyed to individual frames <PARAM NAME="HREF" VALUE="aURL"> -- The URL of the page to visit when user clicks on the animation (if not set, click pauses/resumes the animation) </APPLET>
STARTIMAGE and ENDIMAGE let you specify a range of images. Specifying an ENDIMAGE that is numerically less than the STARTIMAGE will display the images in reverse order. Both parameters have default values of 1, so specifying only STARTIMAGE="15" means "play the frames in reverse order from 15 to 1." Saying only ENDIMAGE="13" means "play the frames from 1 to 13." Of course, you can use both STARTIMAGE and ENDIMAGE together.
NAMEPATTERN lets you specify how to generate the names of the files in the range STARTIMAGE to ENDIMAGE. The pattern is like a URL with substitution. Any instance of the characters '%N' will have the current index (integer in the STARTIMAGE..ENDIMAGE range) substituted for it; any instance of '%[digit]' -- for example, '%5' -- will have the index plugged in, left-padded with zeroes. Finally, '%%' substitutes a single '%'.
Some examples (all assume STARTIMAGE = 1 and ENDIMAGE = 10):