DATA FILE: MOVIES
Movies are swf, jpg, gif or png files which are loaded on top of the map. Movies can contain other movies, lines or labels.
There are several embedded movies, which you don't need to load: rectangle, circle, border, target, home.
Movies should be placed in <movies> node:
<movies>
<movie file="icons/pin.swf" long="-103.997" lat="6.7739" title="USA">
<description><![CDATA[<b>Some html formatted description can be placed here</b>]]></description>
</movie>
<movie file="rectangle" x="0" y="0" width="100%" height="50" color="#CC0000"></movie>
</movies>
All available movie properties (attributes)
| file |
String |
|
File name of a movie. This file should be placed in "path" folder (defined in map html file). If you want to use embedded movie, set movie name here: file="rectangle" (circle, border, target, home) |
| x |
Number or Number% |
|
If you want your movie to be bounded to the stage, set x and y properties. This means that this movie will not move together with the map. To find desired x and y, use developer mode. |
| y |
Number or Number% |
|
| lat |
Number |
|
If you want your movie to be bounded to the map, set lat and long (latitude and longitude) properties. This means that this movie will move together with the map. To find desired lat and long, use developer mode. |
| long |
Number |
|
| width |
Number or Number% |
|
Width and height of your movie. If you want to keep original size, do not set these properties. |
| height |
Number or Number% |
|
| rotation |
Number |
|
Movie clip rotation in degrees. |
| fixed_size |
true / false |
false |
"false" means that the movie will be resized together with the map (when zooming). If you want your movie to remain the same size, set this property to "true". |
| center |
true / false |
false |
"true" means that the movie center will be in specified longitude & latitude (or x & y). Otherwise movie's top left corner will be in this position. I recommend to set "true" for photos, images and custom swf movies. However default amMap icons are made so that the icon's center is in 0,0 position, that's why you shouldn't set this setting to "true" when you use these icons. |
| remain |
true / false |
true |
"true" means that this movie will remain visible when user clicks on it or on other objects in the same level. If your movie clip has child objects, you might want to make it invisible - set this property to "false" then. |
| oid |
String |
|
Unique object id. You only need it if you want to make "link" from one object to another. |
| color |
Hex color code |
|
If you do not set color, the movie will keep its original color. |
| color_hover |
Hex color code |
|
Movie color when user roll-overs it. Movie will not change color if this property is not set. |
| alpha |
Number |
100 |
Movie alpha. 0 for invisible (but still clickable). |
| title |
String |
|
Movie title. Title can be displayed in a roll-over balloon. |
| url |
String |
|
There are several options:
- web site address: http://www.ammap.com
- JavaScript function: javascript:alert('movie clicked');
- #top - will go to top level of your map
- #parent - will go one level up
- #object_id - will act as if object with oid="object_id" was clicked
|
| target |
String |
|
Target of url. Will work only if url is web site address. Do not set any target if you want this page to be opened in the same window. For a new window use "_blank". |
| flash_vars |
String |
|
If you use amMap on a web server, you can pass variables to your movies by adding them to your file name, for example: file="movie.swf?id=50&color=#CC0000". However if you open ammap as a stand alone flash project, this method will not work. The parameter "flash_vars" will help you to solve this problem. You can pass any number of variables to your movie: flash_vars="id=10&color=#CC0000". |
| value |
Number |
|
Value of the movie. Value can be displayed in a roll-over balloon. |
| zoom_x |
Number% |
|
You should set zoom_x, zoom_y and zoom if you want map to be zoomed or moved to a different position when user clicks on the movie. To find out these values, turn developer mode on, set desired zoom level and position, copy "zoom info" to clipboard and paste it into movie node. |
| zoom_y |
Number% |
|
| zoom |
Number% |
|
| text_box |
true / false |
settings.text_box.enabled |
Text box displays description of your movie. If your movie has description, but you don't want text box to appear, set this attribute to false. |
| text_box_x |
Number or Number% |
settings.text_box.x |
Text box x, y, width and height. All these values can be set in pixels or in percents. To find out desired x and y, use developer mode. If you do not set these values, the default values from settings file will be used. |
| text_box_y |
Number or Number% |
settings.text_box.y |
| text_box_width |
Number or Number% |
settings.text_box.width |
| text_box_height |
Number or Number% |
settings.text_box.height |
| balloon |
true / false |
true |
If you want to disable roll over balloon for your movie, set this attribute to false. |
Hint: if you add ! before x, y, text_box_x, text_box_y the position will be calculated from the opposite side.
|