Hi Jeff
I know that this response is a while on, but i'm getting a similar issue to
the one you discussed here where the map loads then unloads along with the
movie clip its in. But i don't have any event.unload() calls anywhere in the
script so i cant really see where its happening and when i play it out
locally it just dissapears but when i play it on a server then it gives me
the failed initialization. Which i would link back to the item being on the
wrong server. so essentially whats happening is this:
I have it embedded in a movie that's around 2 levels deep excluding the map.
Main Timeline
-Sub Timeline 1
-Sub Timeline 2
- Map Timeline
And when I animate the "Sub Timeline 2" MovieClip that has the map, onto the
stage, it disappears completely leaving me with the blank background of "Sub
Timeline 1".
1. I've tried using an external swf and loading it into my main movie and it
does the same thing.
2. Ive tried loading it at a higher level (Sub timeline 1) and it works but
then I lose the ability to control its animation with the "Sub timeline 2"
3. I looked for the event.unload() you were talking about and didn't find it
in the code i used to build the map. The code i'm using to load the map is :
import com.google.maps.overlays.Marker;
import com.google.maps.overlays.MarkerOptions;
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.MapTypeControl;
import com.google.maps.controls.ZoomControl;
import com.google.maps.controls.PositionControl;
import com.google.maps.styles.FillStyle;
import com.google.maps.styles.StrokeStyle;
var map:Map = new Map();
map.key =
"ABQIAAAA7QOgFcXWGBb-Du2Tfq6BuxQU0nzBCEMpqwrlEB04N2jT99G1-xSoDSViUL4Xwm4WDtDE6iiipKm-XA";
map.sensor = "false";
map.setSize(new Point(360, 320));
map.x = 0;
map.y = 0;
map.addEventListener(MapEvent.MAP_READY, onMapReady);
this.addChild(map);
function onMapReady(event:Event):void {
map.setCenter(new LatLng(-25.864321,28.701096), 13,
MapType.NORMAL_MAP_TYPE);
map.addControl(new ZoomControl());
map.addControl(new MapTypeControl());
var markerA:Marker = new Marker(
new LatLng(-25.864321,28.701096),
new MarkerOptions({
strokeStyle: new StrokeStyle({color: 0x000000}),
fillStyle: new FillStyle({color: 0xFFFFFF, alpha: 0.8}),
radius: 8,
tooltip: "Kungwini 4X4",
label:"A",
hasShadow: true
}));
map.addOverlay(markerA);
}
Any Ideas as to what might be the problem? i would really appreciate any
help.
Kind Regards
Remo
--
You received this message because you are subscribed to the Google Groups
"Google Maps API For Flash" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-maps-api-for-flash/-/9snKP50NJrIJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-api-for-flash?hl=en.