====== 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. In the ammap/icons folder of the ammap package you can find a lot of swf files which can be loaded and used for different purposes. If you want to how a lot of cities on top of the map, it is recommended to use build-in movies, such as circle or target, as the map will work much faster with these movies. Movies should be placed in node: Some html formatted description can be placed here]]> In the example above there are two movies described. The first one loads external file, pin.swf. The position of this movie is described with lat (latitude) and long (longitude). This means the icon is bounded to a map and will move together with it when zooming and moving. The second movie uses build-in movie, "rectangle". The position of this movie is described using x and y attributes. This means, the position of the movie is fixed and will not change while moving the map. Below are all available movie properties (attributes) ^Name^Type^If not set^Description^ |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, y|Number, 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.| |lat, long|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.| |width, height|Number or Number%| |Width and height of your movie. If you want to keep original size, do not set these properties.| |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. It is recommended 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|Opacity of a movie. 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: 1) web site address: http://www.ammap.com 2) JavaScript function: javascript:alert('movie clicked'); 3) #top - will go to top level of your map 4) #parent - will go one level up 5) #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, zoom_y, zoom|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. If your movie has zoom, lat and long attributes but doesn't have zoom_x and zoom_y, the map will also soom-in to the given longitude and latitude.| |text_box|true / false||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, Number% or !Number||Text box x position.| |text_box_y|Number, Number% or !Number||Text box x position.| |text_box_width|Number or Number%||Text box width.| |text_box_height|Number or Number%||Text box height.| |balloon|true / false|true|If you want to disable roll over balloon for your movie, set this attribute to false.| |link_with|other objects' oid attributes, separated by commas| |If you want some other objects to change color when user rolls over or clicks on this movie, you can add object's ids (oid) here.| |active|true / false|true|If set to "false" the movie will be invisible to mouse events (hover, click, etc.) even if behavior associated with it is set - the mouse will rather interact with underlying map. This feature will allow you to create map overlays that do not interfear with the map functionality.| Hint: if you add ! before the number for x, y, text_box_x and text_box_y, the position will be calculated from the opposite side.