hice una web en flash con as3 que tiene 4 secciones : inicio, servicios , contacto y descargas.
En la parte de contacto le agregue un google map que encontre en un post del foro, la web va bien al abrirla, al ir a la seccion Contacto ,se carga el mapa perfectamente pero cuando salgo de ahi y voy a cualquier otra seccion de la web se sigue cargado el mapa, es decir no se borra y se queda ensima del contenido de las demas secciones.
Codigo as3 :
//IMPORTAR LAS CLASES NECESARIAS
import com.google.maps.LatLng;
import com.google.maps.Map;
import com.google.maps.MapEvent;
import com.google.maps.MapType;
import com.google.maps.controls.*;
import com.google.maps.LatLng;
import com.google.maps.overlays.*;
import com.google.maps.MapMouseEvent;
import com.google.maps.InfoWindowOptions;
//DEFINE ANCHO Y ALTO DE LA PELICULA
var ANCHO:int = stage.stageWidth;
var ALTO:int = stage.stageHeight;
//CREA EL MAPA
var map:Map = new Map();
//SE CREA UNA VARIABLE TIPO MARKER PARA LOS MARCADORES
var marker:Marker;
//LA GOOGLE API KEY(LA DA GOOGLE)
map.key = "Mi apy key";
map.x = 0
map.y = 260
//ANCHO Y ALTO DEL MAPA = A LOS DE LA PELI
map.setSize(new Point(500, 260));
//DETECTAR SI EL MAPA YA CARGO
map.addEventListener(MapEvent.MAP_READY, onMapReady);
//SE CARGA EL MAPA PARA LA VISUALIZACION
this.addChild(map);
//SE DEFINE EL CAMPO DE TEXTO Y SUS ATRIBUTOS PARA LAS COORDENADAS DEL CENTRO
var texto:TextField = new TextField();
var formatoTexto:TextFormat = new TextFormat();
this.addChild(texto);
formatoTexto.font = "arial";
formatoTexto.size = 12;
formatoTexto.align = TextFormatAlign.LEFT;
formatoTexto.bold = true;
texto.multiline = true;
texto.background = true;
texto.autoSize = TextFieldAutoSize.LEFT;
texto.defaultTextFormat = formatoTexto;
//SE DEFINE EL CAMPO DE TEXTO Y SUS ATRIBUTOS PARA LAS COORDENADAS DE LOS MARKERS
var texto1:TextField = new TextField();
var formatoTexto1:TextFormat = new TextFormat();
this.addChild(texto1);
formatoTexto1.font = "arial";
formatoTexto1.size = 12;
formatoTexto1.align = TextFormatAlign.RIGHT;
formatoTexto1.bold = true;
texto1.multiline = true;
texto1.background = true;
texto1.autoSize = TextFieldAutoSize.RIGHT;
texto1.defaultTextFormat = formatoTexto1;
//SI TODO SE CARGO OK EJECUTA
function onMapReady(event:Event):void {
//CENTRAR EL MAPA, DEFINIR EL ZOOM Y EL TIPO DE MAPA
map.setCenter(new LatLng(-32.913737, -60.735382), 16, MapType.NORMAL_MAP_TYPE);
//MUESTRA EL CONTROL DE ZOOM
map.addControl(new ZoomControl());
//MUESTRA EL CONTROL DE POSICIÓN
map.addControl(new PositionControl());
//MUESTRA EL CONTROL DE TIPO DE MAPA
map.addControl(new MapTypeControl());
//CREA UN MARKER
marker=new Marker(new LatLng(-32.913737, -60.735382));
//Y LO AGREGA A LA VISUALIZACION DEL MAPA
map.addOverlay(marker);
//DEFINE LAS OPCIONES DEL MARKER
var options:MarkerOptions =
new MarkerOptions( { fillStyle: { color:0xFF0000, alpha:0.8 }} );
marker.setOptions(options);
}