# Documentation for AniS - the AnimationS applet

October 13, 1999
updated: November, 2005

### What's new

New parameters have been added: `base_static, overlay_static, keep_zoom`. See details below.

Quick Links in this Document

- HTML Format and Controls parameter
- Other Applet parameters
- Image file names
- Portals
- Using Overlays
- Using explicit paths to your files
- Language considerations and Locales

To run the applet, you need an applet tag. The skeleton for this is:

    <HTML>
    <HEAD>
    <TITLE> Exampl of using the AniS applet </TITLE>
    </HEAD>
    <BODY>
    <P>
    <APPLET code="AniS.class" width=640 height=540>
    <PARAM name="parametername" value="value(s) for parameter">
    </APPLET>
    </BODY>
    </HTML>

The rest of this document describes the PARAMeter names and values needed to drive the AniS applet. We begin with the controls and then describe the specification of the filenames of the images.

One word about blanks (spaces). Within each PARAMeter clause, leading and training blanks are ignored for each parameter. You should use spaces to provide for easier readability.

Parameters for controls (if the control is named, it will appear; otherwise, its default value will be used):

    <PARAM name="controls" value="startstop, looprock, step, speed, enhance,
        firstlast, refresh, toggle, rotator, zoom, fader, overlay, framelabel, audio,
        show, setframe">

This `controls` parameter will position the controls above the image window. If you would like some (or all) of the controls below the image window, use the `bottom_controls` tag, as in:

    <PARAM name="bottom_controls" value="startstop, looprock, step, speed, enhance,
        firstlast, refresh, toggle, rotator, zoom, fader, overlay, framelabel, audio,
        show, setframe">

Note: You must not specify the same control in both the `controls` and the `bottom_controls` parameters!

Here are the details about each control:

- startstop is a button for starting and stopping the looping. If it is not specified, the loop will run forever (if you have otherwise set the `start_looping` parameter to "true"). You may use the "rate" parameter to set the initial looping speed.
- looprock is a button that is used to control whether a movie loop or a rock back-and-forth mode is used. The default is loop, but may be specified as rocking using the "rocking" parameter.
- step creates two little buttons useful for single stepping, forward and backward. The left- and right-arrow keys on the keyboard may also be used for this purpose.
- firstlast creates two little buttons useful for going immediately to the first or last frame in the sequence.
- speed is a slider that determines the animation rate. If not used, a default rate of 3 frames per second is used (unless overridden by the 'rate' parameter).
- show is a button that will allow the user to show a single frame (image) by itself in the browser. The intended purpose is to allow the user to save and/or print the image. If used, this control is only active when the looping is stopped. Normally, the image will be displayed in a separate window; if you want the user to see the image in the same window, use "show/same" for the control name. The `show` control cannot be used with "faded" images.
- enhance enables on-the-fly enhancements (colorizing) of the gray levels in the base images. When you specify this control, you must have defined a text file named enh.tab in the same directory as the HTML which contains the enhancement curves you want the user to be able to choose from. A sample is provided in the distribution. An attempt will be made to read this file, regardless of whether this control is specified or not (see the "no_enh" parameter, below).
- refresh is a button that will attempt to force a reload of the image files, ignoring any cached images (unless the 'use_caching' parameter has been set). This is useful for realtime data applications, where the contents of the image files may be changing. NOTE: If you are using the "file_of_filenames" method of naming the image files, it is very important not to change the total number of images if you change the contents of the "file_of_filenames".
- auto_toggle is a button that will turn the auto refresh function on and off. If you have the ability to zoom or enhnace images, along with an auto refresh, you might want to include this button (when an auto refresh cycle happens, all zooming and enhancements are cancelled). Normally the auto-refresh is enabled at the start. If you want autorefresh to be initiall turned off then append the characters `/off`...for example: `auto_toggle/off`.
- toggle provides a way for the user to toggle images on and off. If you specify this control, a series of little colored boxed will be displayed on a separate line. As each frame is looped through, the box corresponding to the image will change color. If the user (left button) clicks on a box, she will disable it (clicking again will re-enable it). If the user (right button) clicks on a box, she will cause the program to show that frame. Note: you may set the width, height, and spacing of these boxes -- see the toggle_size parameter below. Normally, a text line of help information appears below the toggle boxes; if you want to supress this, append the characters `/nohelp`....for example: `toggle/nohelp`.
- rotator provides a different way of letting the user see what image in the sequence they are looking at...and to control which frame they are seeing. A circular widget is used, with a rotator 'arm' that will not only show the frame by it's angle (first frame is "North" pointing, and sucessive frames move the arm clockwise), but allows the user to select a frame by dragging the mouse around. There are two related `<param name=...>` parameters that can be used: `name="rotator_labels" value=...` (see below) for specifying up to 8 labels, and `name="rotator_color" value=...` for specifying the color of the rotator "arm"; the cirle and labels are always done using the `foreground` color. Normally, the `rotator` should not be used with the `toggle`.
- setframe will provide a slider for setting the frame being shown by simply sliding the slider. Although this is designed to be used instead of animation, it can be used with it.
- zoom will provide a pixel-duplication zooming ability. When the 'zoom' button is clicked, the cursor will change shape. When the user clicks with the left button that on the image, it will be zoomed one factor (x2, x3, x4...) at the cursor location. After the first zoom, the button will be relabelled "un-zoom". The user may then 'roam' the image around by dragging the mouse. More left-clicks will zoom in farther; right-clicks will zoom out one step per click. If the "un-zoom" button is clicked, the image will be restored to the original.

  See the "active_zoom" parameter (below) to enable zooming without this explicit control button. The user may also use "ALT+click" or "middle button click" to reset the zoom when in this mode.

  See the "keep_zoom" parameter (below) to make the zoomed state persist after a "refresh" is done.

- fader will provide a slider for setting the "fade" level. You should NOT use this in combination with any of the first 4 controls (which allow for animating faded images when the "fade" parameter is set to 'true' and the 'fader' control is not specified).
- overlay provides one or more checkboxes that allows for images to be overlaid on the base image. Each box will be labelled according to the 'overlay_labels' parameter. You may also use "radio buttons" instead of checkboxes for some or all of these, using the 'overlay_radio' parameter.
- framelabel provides a text field into which a label will be put for each image in a sequence of images. The text may be specified using the frame_label PARAM or from the file_of_filenames file (see below).
- audio enables a button that allows an audio clip to be played. In order to use this option, you must also specify the audio_filename PARAM (see below).

Other parameters that may be used:

    <PARAM name="use_archive" value="x">

specifies that all the data files are contained in an archive file that is specified in the <applet> tag. You must include all extra files (enh.tab, file-of-filenames) as well. The form of the <applet> tag is like:
`<applet archive="aniscode.jar,data.zip" class="AniS.class" height=....>`
where the data files are stored in "data.zip".

    <PARAM name="use_progress_bar" value="false">

specifies whether to use the "Progress Bar" to indicate the status of loading images from the server. The default for this parameter is "true". Setting the value to "false" will cause a message `Loaded XX of NN` to be displayed on the screen (where NN is the total number of all images, and XX is the current loading value. This message is also displayed in the "Applet Status Line" in the browser. When using the "Progress Bar" mode, the Applet Status Line will show the percentage of images loaded.

    <PARAM name="active_zoom" value="x">

specifies that the zoom ability will always be active; this cannot be used in conjunction with the "zoom control". If you specify this parameter, user left-clicks on the image will zoom at that point, right-clicks will zoom out. While zoomed, the image may be roams by dragging the mouse around.

This option should not be used when portals are also used.

    <PARAM name="keep_zoom" value="x">

specifies that the zoom level and position will be restored after a "refresh" is done. Without this parameter, the zoom is reset to the "un-zoomed" view.

    <PARAM name="image_window_size" value="400,200">

specifies that the images will be displayed in a window with a width=400 and a height=200. Without this parameter, the size of the window is the size of the first frame (image). When this parameter is used, the images will be rescaled to this size. If zooming is active, when the user zooms, the image will be zoomed as usual, possibly showing more detail.

This option should not be used when portals are also used.

    <PARAM name="image_preserve" value="0,0,639,49, 610,0,639,479">

specifies that when images are zoomed, the two rectangular areas specified (top 50 lines, right-most 30 pixels) should be preserved from the original image. This is useful for showing labels and logos that are part of the original images. There may be one or more such rectangles; the number of values must be a multiple of 4.

The values of the coordinates are ordered: x_upper_left,y_upper_left, x_lower_right, y_lower_right. The (0,0) point for images is in the upper_left corner. The 'x' coordinate is horizontal, the 'y' coordinate is vertical.

    <PARAM name="use_caching" value="true">

specifies that the image file reads will use any caching that is available. This may include the brower's own cache and/or the caching that might be provided by the server. For real-time or frequently updated images, this option should be used with caution, since caching may cause old, out-dated images to be used. On the otherhand, if your filenames are always unique (for example, if the date/time is part of the filename) then this can be very effective. The default for this option is to disable caching and always read all images.

    <PARAM name="auto_refresh" value="16">

specifies that the base images will be automatically reloaded from the source every 16 minutes. An attempt is made to by-pass any use of caching (unless "use_caching", above, has been set to 'true'), and this process has been found to work quiet well in both Netscape and IE. Note: be somewhat cautious with overlays or portals when using the auto_refresh option -- they may not always work as expected.

    <PARAM name="base_static" value="true">

specifies that the base images will be loaded only one time from the server. Any "refresh" action (automatic or manual) will not cause these images to be reloaded. This is appropriate if your base images are unchanging (for example, a topography image). [See also, the `overlay_static` parameter, below.

    <PARAM name="start_looping" value="false">

specifies the initial state of the animation. A value of "false" means the animation is not started automatically. The default value is "true", meaning the animation begins automatically as soon as all frames are loaded. Note: if you do not put in a `startstop` control and set start_looping to "true" then the animation will run "forever".

    <PARAM name="start_frame" value="18">

specifies the frame number (starting at zero) of the frame to display after all loading is done. This option implies "start_looping" is "false".

    <PARAM name="rate" value="120">

specifies the initial loop rate as a number corresponding to frames per second times 10 (thus, 120 means 12 frames per second).

    <PARAM name="minimum_dwell" value="30">

specifies the minimum dwell (milliseconds) that can be set with the `speed` slider. The default value is 30ms; the minimum value is 5ms. Not that using small values can cause slower computers to have problems whilst looping.

    <PARAM name="dwell_rates" value="1000,1000,500,30,1000">

specifies the dwell (in milliseconds) for each frame. There must be the same number of values (comma-separated) as there are frames in the animation. In this example, the first and second frames have a fixed dwell if 1s, the third frame is a half-second, the fourth is 30ms, and the fifth frame is 1s. NOTE: these times assume no additional overhead, which is usuallly not the case!

Frame dwell rates may also be set in the file_of_filenames (see below)

    <PARAM name="rocking" value="true">

make "rocking" the startup mode for displaying the sequence; otherwise, "movie loop" is the startup mode.

    <PARAM name="pause" value="2000">

pause on the last frame of a loop the additional number of milliseconds given (2 seconds in this example). The default is zero.

    <PARAM name="pause_percent" value="250">

pause on the last frame of a loop the additional percentage of the current dwell time specified (250% in this example). In addition, if the current dwell is > 1 second, a fixed value of 100% will be used whenever this pause_percent option is specified. The default value is zero.

    <PARAM name="transparency" value="#FFFFFF">
    <PARAM name="transparency" value="#000000,#050505">

use the color "white" as the transparency value. This is only needed for overlays, and is optional for fading. The value is a hex value of red/green/blue (template: #rrggbb). "black" (#000000) is also commonly used. In the second example, the transparent values range from 00 to 05 for red, green and blue. This form is particularlly useful when the background is not quite a constant value.

    <PARAM name="overlay_transparent_amount" value="100, 40, 20">

The non-transparent pixels in overlays should be set to the opacity percentage indicated. In this case, the first overlay (see overlay_labels) is 100 opaque, the second is 40% and the third is 20%. 0 = totally transparent (you will not see anything! 100 = totally opaque (what would normally happen).

    <PARAM name="overlay_zorder" value="3,1,2,0">

Changes the order of stacking of the overlays, so that the overlay labels may be arranged in an order that is independent of the stacking of the overlays. The default is: 0,1,2... When using this parameter, there must be one and only one value for each overlay. The example says that the first overlay will be "on top" and the last one will be on the bottom, with the second and third (values 1 & 2) will be in the default order.

    <PARAM name="fade" value="true">

instead of just showing the images, generate 'faded' images between them and use the result as the sequence.

    <PARAM name="fader_label" value="Vis     IR">

instead of the "Set Fader Level" label on the fader control, use the specified label. Note the label is centered so you must provide ample spaces to ensure the fader control is made large enough. In this case, the user wanted "Vis" on the left and "IR" on the right, so many spaces were put between the words.

    <PARAM name="backcolor" value="xff00ff">

set the applet background color (used for backgrounds of all the controls as well...) to the RGB value (in hex) given (in this case, red=255, green=0 and blue=255)

    <PARAM name="forecolor" value="xffffff">

set the color of the foreground (used for names on buttons, etc.) to the RGB value (in hex) given (in this case, white). Note that you should keep a good contrast between the background and foreground colors.

    <PARAM name="setframe_label" value="   Image Frame Number *   ">

set the template to use for labelling the "setframe" control slider/scrollbar. The given string of characters must contain an asterisk ("*") character; the actual frame number will replace this when displayed.

    <PARAM name="frame_label" value="label for 1, label for 2, ...">

when the framelabel control is specified, the values in this comma-separated list will be used to label each frame. If you enclose a standard format date-time between a pair of "$$" characters, it will be replaced by a string for the computer's local time zone. For example:

        "Picture from $$5/10/00 15:00 GMT$$ in the morning"

will be displayed as:

        Picture from May 10 10:00:00 CDT 2000 in the morning

The formatting is fixed by the Java library...

    <PARAM name="frame_label_width" value="30">

this specifies the width of the text box (in characters) to be used for the frame_label strings. The default is 20

    <PARAM name="audio_filename" value="audioclip.au">

this specifies the name of the audio clip to be played when the audio control is specified. This must be a .AU file.

    <PARAM name="image_base" value="http://www.my.host/mydir/">

this directs that the base URL of the image files (and the file_of_filenames, if used) should be the value given. The default URL is the directory containing the HTML. Note that the hostname in the specified URL must be the same as the hostname where the applet is read from.

    <PARAM name="use_IP" value="true">

this specifies that the 'hostname' of the machine from which the applet was loaded will be converted internally to an IP address, and this IP will be used for all file reading. . This can be very helpful if your server uses hostname and IP spoofing for things like loadsharing. The value "true" must be exactly that!

    <PARAM name="toggle_size" value="5,10,3">

this sets the toggle control's little boxes width to 5, the height to 10, and the spacing between them to 3. This can be very helpful if you have a large number of frames and don't want to make your applet width too large just to accomodate these boxes.

    <PARAM name="rotator_labels" value="N, E, S, W">

this defines the labels to be used with the `rotator` widget. You may specify up to 8 labels (more just won't fit...) that will be evenly distributed around the circle. The first label will be placed at the top ("North"), and sucessive labels will be positioned clockwise around the circle. Depending on the letters, you may be able to get up to 4 letters per label (certainly more than that for the top and bottom (0 and 180 degrees). If you use 'fading', then the number of frames will be recomputed when you activate/de-activate it, but the rotator labels will not change.

    <PARAM name="rotator_color" value="x00ff00">

this defines the color to use for the `rotator` "arm". It is in for format: xRRGGBB, so the value shown will make a green colored arm. The labels and circle will be drawn with the foreground color specified. The default is yellow (xffff00).

    <PARAM name="enable_png" value="true">

this enables the use of PNG files for all JVMs/browser versions by using the `sixlegs PNG decoder.` If you want to use PNG and do not have control over browser or JVM versions, you may want to consider this. If you use this option, then your image file names MUST end with `png` (See note, below, under "Image file names" regarding the use of the wildcard format.) Please see this page for more details about using PNG files.

    <PARAM name="blank_screen" value="true">

this will cause the background of each frame to be blanked out priod to showing each image. This should be used if some of your images have 'transparency' set (for example, GIF and PNG images allow you to set a level, like the 'background' to transparent). Enabling this option will prevent the images from appearing to be overlaid, but may slow down the animation speed.

    <PARAM name="no_enh" value="true">

this supresses the attempt to read the "enh.tab" file. This takes care of a problem when using a firewall with password protection, when no enhancement is used.

    <PARAM name="locale" value="es">

this forces the language to the values 'es' (Spanish) Normally, the language of the client machine is used. This parameter provides a way to over-ride this, if needed. Caution: some Unicode characters may not appear correctly when this option is used!

    <PARAM name="portal_pointers" value="false">

this prevents the display of the portal pointers (cursors) that are normally used to help show the co-locations of points within the main and portal images. The default value for this is `true`. You might want to set this to `false` when you are using, for example, a four-panel display (four portals that cover up the background completely).

Image file names
All the image files can be in GIF or JPEG formats. The files identified using the parameter names described in this section should fill the desired window. If used, overlays and portals should be the same size and have the same geometry as these "background" images.

For the background images, the GIF/JPEG files may be specified in one of three, mutually exclusive, ways.

1. Using a "root" name, to which successive numbers are appended to create the actual filenames:

          <PARAM name="basename" value="file">
          <PARAM name="num_frames" value="4">
          <PARAM name="base_starting_number" value="0">

   In this case, the root name is file and since there are 4 images specified with the numbering starting at 0, the actual filenames must be: file0, file1, file2, and file3. Please note that the default base_starting_number is zero, and so it would not have to specified in this case...

   Also, please see the Note below about this form and wildcards

2. Using the filenames themselvels:

          <PARAM name="filenames" value="file0, file1, file2, file3">

3. Using a file which contains a list of the image filenames (one per record)

          <PARAM name="file_of_filenames" value="file-containing-filenames">

   where the file "file-containing-filenames" contains lines of text that are in the form:

          file0
          file1
          file2
          file3

   lines beginning with # are ignored, so you may put comments into your file_of_filenames.
   NOTE: If you want to specify an optional frame label (see the controls section above), you may put the value with quote marks after the filenames. (The label may, optionally, contain a date-time to be reformatted for the user's timezone -- see "frame_label", above.) For example:

           file0 "label one"
           file1 "label two"

   NOTE: If you want to specify an optional dwell rate for each frame, put the value (in milliseconds) inside brackets after the filename. Be sure to put a space before and after the brackets. If you use this mode, you must supply a dwell rate for every frame! For example:

           file0 [800] "label one"
           file1 [300] "label two"

NOTE: For the first form (specifying a "basename"), you may also use a wildcard format. There are two forms of this, one using a single * (to substitute numbers 0,1,2...,10,11,.. at that point) and the second using one or more ? (to substitute the numbers with leading zeroes for all the ? marks). For example, if you say:

       <PARAM name="basename" value="file*.gif">

the actual filenames must be: file0.gif, file1.gif, file2.gif, and file3.gif

You may also use the form:

       <PARAM name="basename" value="file????.gif">

the actual filenames in this case must be: file0000.gif, file0001.gif, file0002.gif, and file0003.gif

Note that in both these cases, you may also use the "base_starting_number" parameter to modify the starting value (which otherwise defaults to zero).

Portals
Portals are viewports into other images, which are shown in windows superimposed onto the background image. The user "roams" around in a portal by dragging the mouse pointer around on the background image. For each portal, you must specify its location and size, and then the filename(s). If you are animating the background images, you'll need to specify a corresponding number of portal filenames for each frame of the animation.

First, however, the parameter for specifying the location:

       <PARAM name="portal_locations" value="x & y & width & height, x2 & y2 & width2 & height2, ...">

Each list item separated by a comma defines the location (x,y) of the upper left corner of the portal and the portal's width and height values. All values are given in pixels; the upper left corner is (0,0).

You may have any number of portal windows that you like, but they should all fit inside the dimensions of the background image and should not overlap.

To specify the portal image filenames, you may use one of the following forms (note in each example, 3 portals are being defined with the names associated with each separated by a comma; in the second method, the files for each of 4 frames are explicitly named separated by &).

1. In the first case, you are specifying a "basename" for each portal (see file name conventions, above). Each name you specify is for an individual portal, and the software will load as many images for each portal as there are background image frames.

          <PARAM name="portal_basenames" value="pfileA, pfileB, pfileC">

   (You may also use the wildcard format mentioned above.)
2. In the second case, you are naming each file explicitly. The grouping of names is the same as above -- commas separate portals. Ampersands separate filenames for each frame of a loop.

          <PARAM name="portal_filenames" value="pfileA0 & pfileA1 & pfileA2 & pfileA3,
       	  pfileB0 & pfileB1 & pfileC2 & pfileD3,
       	       pfileC0 & pfileC1 & pfileC2 & pfileC3">

3. Finally, you may also use a text file (the "file-containing-filenames" form) to specify all the filenames. To use portals with this form, the filenames for all the portals for one frame appear on one line.

             file0 portal=pfileA0, pfileB0, pfileC0
             file1 portal=pfileA1, pfileB1, pfileC1
             file2 portal=pfileA2, pfileB2, pfileC2
             file3 portal=pfileA3,pfileB3, pfileC3

   NOTE: You MUST supply all portals names for each frame, even if the filename is repeated!!
   NOTE: If you want to specify an optional frame label (see the controls section above), you may put the value with quote marks between the filenames and the keyword that follows. For example:

           file0 "label one" portal=pfileA0, pfileB0,...
           file1 "label two" portal=pfileA1, pfileB1,...

   NOTE: If you want to specify an optional dwell rate for each frame, put the value (in milliseconds) inside brackets after the filename. Be sure to put a space before and after the brackets. If you use this mode, you must supply a dwell rate for every frame! For example:

           file0 [800] "label one" portal=pfileA0, pfileB0,...
           file1 [300] "label two" portal=pfileA1, pfileB1,...

Overlays
You may also use overlays -- one or more images that are (optionally) displayed on top of the base image, usually in such a way that part of the base image shows through. For example, a map or plotted data may be an overlay. In order to let some of the base (background) image show through, you must designate one color level in the overlay images as "transparent" and then specify that value using the transparency parameter (above). You may also specify the opacity/transparency of the non-transparent portions of overlay images -- see the overlay_transparent_amount parameter (above).

In addition, you need to specify the overlay control, and provide a few more parameters:

- Define the labels for the checkboxes and/or radio buttons:

         <PARAM name="overlay_labels" value="label1, label2, label3...">

  This specifies the labels that will be used on the controls for each overlay. The ordering of the values should be the same as the filenames (below). You'll want to keep these labels brief!

- Specify the initial state of each overlay. By default, all overlays are initially "off". If you want to force one to be on, append /on to the label. From the previous example:

         <PARAM name="overlay_labels" value="label1, label2/on, label3...">

  would force the second overlay to be initially turned on.

- An overlay with no control button. If the overlay is to be "on" all the time (and thus, no checkbox or radio button will appear for it), append /always to the label. For example:

         <PARAM name="overlay_labels" value="label1, label2/always, label3...">

- Hidden overlays. If the overlay is to be linked (see "overlay_links", below) and should have no checkbox or radio button for it), use /hidden. This is onlyuseful when `linked` to an "owner" and will follow its state. (the "hidden" item should have the negative link value, and thus is the "target").

- Using "radio buttons". If you want to treat some or all of the overlays as 'radio buttons' (that is, only one of them may be showing at once), you may use the overlay_radio parameter. For example:

         <PARAM name="overlay_radio" value="true,false,true,true,...">

  This would specify that overlays 1, 3, and 4 would be 'radio buttons' and only one could appear (be "ON") at once. Overlay #2, however, may be toggled on and off indepdently. If you want to use radio buttons for all of your overlays, you may simply say `<param name="overlay_radio" value="true">`

- Layout of checkboxes and radio buttons. Normally, the checkboxes and radio buttons will be laid out in a single row; unfortunately, the layout manager will simply not show any that would appear beyond the WIDTH. You may specify that the checkboxes and/or radio buttons appear on two rows in the GUI. If you preceed the label name with a "/" then this will start a second row. For example:

         <PARAM name="overlay_labels" value="label1, label2/on, label3, /label4, label5/on...">

  specifies that the checkboxes for #1, #2 and #3 will appear on one row, while the checkboxes for #4, #5, etc., will appear on a second row. Using this option will increase the `height` required for the applet!

- Linking overlays together. It is also possible to link overlays together so that when the user clicks one on, more than one is activated. For example:

         <PARAM name="overlay_links" value="0,1,0,-1,-2,0,2">

  The values of zero ("0") indicate no linking. Positive values are the "owner" and the corresponding negative value is the "target". When an "owner" is turned on, the corresponding "target" is also turned on. When the "owner" is turned off, the "target" will not change, unless it was a "/hidden" overlay (see above). Each "owner" may have more than one "target", and vice-versa.

- Positioning overlays on the screen. You may also change the position of an overlay on the screen. Normally, overlay images are located with the upper left corner in the upper-left of the display (x=0, y=0). You may use the overlay_locations parameter to move the overlay. For example:

         <PARAM name="overlay_locations" value="10&20, 100&200, 0&0,...">

  This would specify the overlay #1 would be positioned with it's upper left corner at location (x=10, y=20), overlay #2 would be at (x=100,y=200), and overlay #3 at (x=0, y=0...the default). If you use this parameter, you must specify a location for each overlay for which you provide a label.

- Static, unchanging overlay images. If you have some overlays that are "static" and do not need to be reloaded from the server when the user clicks "Refresh", you can used the overlay_static parameter to designate which one(s) are static (and which ones are not static, and should be reloaded).

         <PARAM name="overlay_static" value="y,y,n,n,y">

  Indicates the first, second and fifth overlays do not change and need not be reloaded. The third and fourth will be reloaded when the user so requests (or the automatic timer goes off).

- More parameters. See information above about the overlay transparancy and "z-ordering" of overlays! Also, see the `base_static` parameter, above.

Overlay file names

To specify the names of the files for the overlays, you may use one of these forms (note in each example, 3 overlays (A,B,c) are being defined with the names associated with each separated by a comma; in the second method, the files for each of 4 frames are explicitly named separated by &).

1. In the first case, you are specifying a "basename" for each overlay (see file name conventions, above). Each name you specify is for an individual overlay, and the software will load as many images for each overlay as there are background image frames.

          <PARAM name="overlay_basenames" value="ofileA, ofileB, ofileC">

   (Again, you may use the wildcard format -- see above.)
2. In the second case, you are naming each file explicitly. The grouping of names is the same as above -- commas separate portals. Ampersands separate filenames for each frame of a loop.

          <PARAM name="overlay_filenames" value="ofileA0 & ofileA1 & ofileA2 & ofileA3,
       	  ofileB0 & ofileB1 & ofileB2 & ofileB3,
       	       ofileC0 & ofileC1 & ofileC2 & ofileC3">

3. Finally, you may also use a text file (the "file-containing-filenames" form) to specify all the filenames. To use overlays with this form, the filenames for all the overlays for one frame appear on one line.

             file0 overlay=ofileA0, ofileB0, ofileC0
             file1 overlay=ofileA1, ofileB1, ofileC1
             file2 overlay=ofileA2, ofileB2, ofileC2
             file3 overlay=ofileA3,ofileB3, ofileC3

   NOTE: You MUST supply all overlay file names for each frame, even if the filename is repeated!!
   NOTE: If you want to specify an optional frame label (see the controls section above), you may put the value with quote marks between the filenames and the keyword that follows. For example:

           file0 "label one" overlay=ofileA0, ofileB0, ofileC0
           file1 "label two" overlay=ofileA1, ofileB1, ofileC1

   NOTE: If you want to specify an optional dwell rate for each frame, put the value (in milliseconds) inside brackets after the filename. Be sure to put a space before and after the brackets. If you use this mode, you must supply a dwell rate for every frame! For example:

           file0 [800] "label one" overlay=ofileA0, ofileB0, ofileC0
           file1 [300] "label two" overlay=ofileA1, ofileB1, ofileC1

Explicit paths in your HTML for dynamic web pages (or how to avoid having multiple copies of the AniS class files on your server)

If you are generating dynamic web pages (using, for example, a Python script) or have several different animations on your server and want to avoid having multiple copies of the AniS class (or JAR) files, we suggest you use the "codebase" attribute that is available in the <applet> tag to point to the location on your server of the class or JAR files. For example:

    <applet codebase="../../code" code="AniS.class" height=...>

or, if you are using the aniscode.jar file, then:

    <applet codebase="../../code" archive="aniscode.jar" code="AniS.class" height=...>

You may also give a full URL for the codebase, but it must be on the same machine:

    <applet codebase="http://my/machine/applets/code" code="AniS.class" height=...>

Finally, the image files are read _relative to the directory containing the HTML_. If you need to change that you can include the directory information in the filename (the same is true when using the 'file-of-filenames' method). For example:

    <param name="filenames" value="../../images/goes1.gif,../../images/goes2.gif">

Language considerations AniS buttons and sliders, etc., have the ability to be labelled in a variety of languages. Each language requires a "properties bundle" file to be created that contains a "tag" used by AniS and the associated word in the target language. For example:

    loop = \ \ \ Boucle
    rock = Basculer

taken from the current French bundle. Note the leading "\ \ \ " in the first item -- this pads the beginning of the word with 3 spaces (and there are 3 at the end as well) so that the button does not dramatically change size when toggling the label between "loop" and "rock" (or " Boucle " and "Basculer" in this case).

Some letters will have to be put in the text file with their Unicode value. For example:

    pick_enhancement = Am\u00E9liorer les couleurs

puts in the Unicode character defined by hex code "00E9" between the "m" and "l". Note you must use the hexadecimal values. A copy of the unicode chart is available by clicking here

The only other consideration is that the properties files must have a strict naming convention. In this case, we use

    "anismessages_"+<language>+".properties"

(without the " marks) where the <language> is, for example "es" for Spanish, and would result in a file named `anismessages_es.properties`. This file must then be placed into the JAR file and/or be in the directory from which the class files are loaded. If there are any mistakes in the file, the program will revert to the English (the contents of the `anismessages.properties` file).

You may also use the `param` named locale to force the language and country to a fixed value (see above).

The following language files are now available:

- anismessages.propterties = the default file (English)
- anismessages_en.properties = the English file
- anismessages_es.properties = the Spanish file
- anismessages_fr.properties = the French file
- anismessages_tr.properties = the Turkish file

Back to the AniS homepage