The Flash Ani(mation)S applet

Page 7 - Measuing distances

7a. Measuring distances - simple

If you include the "coordinates" parameter, to define (usually) the latitude and longitude of the upper-left and lower-right corners of your images (either in the config file or the file_of_filenames), then if the user does a "shift+drag", there will be a readout of the distance from the mouse-down position to whereever they drag the pointer to.

When the mouse button is released, the line and readout value will disappear. Note that the values are computed with consideration for the zoom-factor as well.

The default units of the readout are in kilometers; however the "distance_unit" parameter may be used to change this to statute or nautical miles, or pixels. The "distance_style" parameter may also be used to change the background and foreground colors and font size.

Here is the config file for the following example:

coordinates=45.2, -91.6, 40.8, -85.1 start_looping = false controls = startstop,speed,step,zoom,toggle,location filenames=rad0.jpg, rad1.jpg, rad2.jpg, rad3.jpg, rad4.jpg is this simple example:

Hold the shift key while dragging the mouse pointer to see the distance readout. Because the "coordinates" parameter was supplied, I enabled the "Location" control button as well.

Note that the "coordinates" parameter may be in the config file, or it may be in each of the file_of_filenames used, so it would be dynamically changed when "hotspots" are used to swtich scenes.

7b. Adding bearing and formatting to distance display

Here we add the following lines to the config file:

distance_unit = mi distance_style = 0x505050, x0ffffff, 16, 2 show_bearing = to

Go To Next Page

FlAniS Home Page

If you would like more information, or have questions or suggestions, please contact Tom Whittaker