Converting from AniS to FlAniS

July, 2008

Let's suppose we have a simple animation already in AniS. The HTML looks like this: <applet archive="aniscode.jar" code="AniS.class" codebase="http://www.ssec.wisc.edu/webcode/anis" width= "635" height="600" alt="You must have Java installed and working to see this page"> <param name="controls" value="overlay,startstop,show,looprock,speed,step,zoom,refresh"> <param name="image_preserve" value="0,0,1000,11"> <param name="file_of_filenames" value="mkx_radar_loop.out"> <param name="backcolor" value="#FFFFFF"> <param name="transparency" value="#000000"> <param name="overlay_labels" value="&lt;20 dBZ, County Map, Cities, Weather, Watches/Warnings"> <param name="pause_percent" value="250"> </applet>

The first thing to do is to copy the HTML "template" file and make the changes needed therein:

  1. change the location of the flanis.swf on your server (this example shows that ours is in "/webcode/anis/flanis.swf" - a common location for all creators)
  2. change the HEIGHT and WIDTH values in two places
  3. change the configFilename= value in two places
When you are done, the HTML should look like this: <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" WIDTH="635" HEIGHT="600" id="flanis"> <PARAM NAME=movie VALUE="/webcode/anis/flanis.swf"> <PARAM NAME=quality VALUE="high"> <PARAM NAME="menu" value="false"> <PARAM NAME="FlashVars" value="configFilename=mkx_loop.cfg"> <EMBED src="/webcode/anis/flanis.swf" NAME="flanis" swLiveConnect="false" quality=high menu=false WIDTH="635" HEIGHT="600" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" scale="noscale" FlashVars="configFilename=mkx_loop.cfg"> </EMBED> </OBJECT>

Next, you need to create the "configuration" text file that contains the values for the <PARAM> items in the old AniS. In the HTML, above, we named this file "mkx_loop.cfg" because it is unique to the "mkx" loop.

This configuration file would look like this:

# config file for MKX radar animation controls = overlay,startstop,show,looprock,speed,step,zoom,refresh image_preserve = 0,0,1000,11 file_of_filenames = mkx_radar_loop.out backcolor = #FFFFFF transparency = #000000 overlay_labels = <20 dBZ, County Map, Cities, Weather, Watches/Warnings pause_percent = 250 controls_tooltip = overlay, Click this button to start/stop the animation, Click this button to print a copy of the display, Click this button to change better loop and rock modes, Use the slider to adjust the speed of the animation, Step one frame - forward or backward, Click this button to enable zooming by clicking on the image, Click this button to refresh the image data from the server overlay_tooltip = Display dBZ values less than 20, Display county outlines, Display city names, Display current weather, Display severe weather watches and warnings Note that I have also included the "tooltip" for each of the controls and overlays; otherwise, the first portion of this file is identical in information content to the %lt;PARAM> information in the AniS Java applet tags.

You are done!


Return to the FlAniS homepage