Question : Hiding Google Maps map in Flash when switching to other page

Hi,

I made a Flash application which will be placed on a site. It has a menu with different buttons which go to different frames (pages). On one of the pages I want to place a “google map”. This works fine, using the code I found here: http://www.developphp.com/Flash_tutorials/show_tutorial.php?tid=593

I included a copy of the code with this post.

However, once the map is displayed one, it stays visible when I go to another tabblad.
How can I hide the map when I go to another tabblad?

I work with Flash CS5 and Actionscript 3, and the code I use to switch between different frames when different buttons are clicked is the “standard” code:

button_1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame);
function fl_ClickToGoToAndStopAtFrame(event:MouseEvent):void
{
                  gotoAndStop(115);
}
Fonske
 
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
// Import google maps,overlays, and controls.
import com.google.maps.*;
import com.google.maps.overlays.*;
import com.google.maps.controls.*;

// Declare a google maps variable. I called it gomap.
// You can name it whatever you want consitantly.
var gomap:Map = new Map()
gomap.key = "Insert your API Key between these quotation marks";

//Set map size.
gomap.setSize(new Point(400,280))

// Set map location.
gomap.x = 300
gomap.y = 60

// Add listener to trigger the MapEvent function.
gomap.addEventListener(MapEvent.MAP_READY, onMapReady);

// Add a child to populate the map to the stage when you publish out(F12).
this.addChild(gomap);

// Make the map run though a function.
function onMapReady(e:Event):void
   {
	   
	/* next bring in control options. Further below is code for
	 navigation which has pan and last position as well as zoom. */
	
	// To add the default simple ZoomControl...	
	//gomap.addControl(new ZoomControl());
	
	/* or set the position of the zoom to specific coordinates.
	There are four(4) anchor points of reference.
	ANCHOR _TOP_LEFT,ANCHOR _TOP_RIGHT,ANCHOR _BOTOM_LEFT,and ANCHOR _BOTTOM_RIGHT.	*/
	
	//var zoom_position:ControlPosition = new ControlPosition(ControlPosition.ANCHOR_TOP_LEFT, 420,100);
	//var myZoomPos:ZoomControl = new ZoomControl();
    //myZoomPos.setControlPosition(zoom_position);
	//gomap.addControl(myZoomPos);
	
	// Scroll zoom is disabled by default, but you can enabled it like this...
	gomap.enableScrollWheelZoom();
	
	// To add the default navigation control at default position...
	//gomap.addControl(new NavigationControl());
	
	// or position the navigation control to coordinates.	
	var nav_position:ControlPosition = new ControlPosition(ControlPosition.ANCHOR_TOP_LEFT, -60,40);
	var myNavPos:NavigationControl = new NavigationControl();
    myNavPos.setControlPosition(nav_position);	
	gomap.addControl(myNavPos);
	
	
	// To add the default map view control buttons at default positions...
	//gomap.addControl(new MapTypeControl());
	
    // or set the position of the map view control buttons...
	var view_position:ControlPosition = new ControlPosition(ControlPosition.ANCHOR_TOP_LEFT, 10,290);
	var myViewPos:MapTypeControl = new MapTypeControl();
    myViewPos.setControlPosition(view_position);	
	gomap.addControl(myViewPos);
    
	
	/*   Set the map center coordinates and starting view type to one of four(4) 
	basic map types... map(NORMAL),satellite(SATELLITE),hyrid(HYBRID),terrain(PHYSICAL)
	Set the zoom with an integer placed between the coordinates and maptype. In this example
	the zoom is set to 6  */
	gomap.setCenter(new LatLng(51.144571,2.901592),14,MapType.PHYSICAL_MAP_TYPE);
	
	/* To find exact LatLng... use google maps... zoom in, right click the spot you want and
	select "What's here?" Latitude, Longitude will appear in the maps search bar */
	
		
   	// You can remove map view control buttons. In this example, the terrain map is removed
	gomap.removeMapType(MapType.PHYSICAL_MAP_TYPE);
		
	// Add a marker variable at specific Latititude and Longitude. 
	// This can be at the same or different coordinates than the setCenter LatLng. 
		var myMarker :Marker = new Marker(new LatLng(51.144571,2.901592),
	
	/*
	You can delete my marker from the Library and replace it with a custom movie clip.
	
	Right click your graphic and Convert to Symbol. Make it a Movieclip.
	Name it marker1. Open the library.(Ctrl L or F11) 
		
	In the Linkage section, select Export for Action Script and Export to Frame 1.
	Select OK. An ActionScript Class Warning will appear: "A definition for this class..."
	Select OK.
	(You can also check it by selecting yor marker in the library list.(Ctrl L) 
	Right click in the list. Select properties. This opens the Symbol Properties.)
	
	Important! Make sure that your marker points to the registry point!
	(You can reopen it in the library(Ctrl L), click on the icon to make it editable and then
	reposition it to point at the crosshairs which are the exact coordinates 
	for the LatLng.) This ensures it will be pointing to the right spot when you zoom.
	*/
	
	new MarkerOptions({icon:new marker1(),
				    // Turn marker shadow on and off with true or false values.						 
										 hasShadow: false}));
	gomap.addOverlay(myMarker);
	}

Answer : Hiding Google Maps map in Flash when switching to other page

105881#
I am asking to hide the CEWP in page & simply add the html code to that source code. then it will work fine.
<style>
.ms-viewheadertr{ display:none; }
</style>
Random Solutions  
 
programming4us programming4us