////////////////////////////////////////////////////////////////////////////////////////////////
public function resizeStage(e:Event):void {
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
stageW = root.stage.stageWidth;
stageH =root.stage.stageHeight;
theGradient.width=stageW;
theGradient.height=stageH;
var theMasterContX:int=(stageW/2)-(The_MasterCont.width/2);
var theMasterContY:int=stageH/6;
var theGroundDestinyX:int= (theGround.width - stageW) * -0.5;
var theGroundDestinyY:int=stageH-theGround.height;
if (stageW>200 && stageH>300) {
TweenLite.to(theGround,((theGround.y<theGroundDestinyY)?0:1),
{x:theGroundDestinyX,y:theGroundDestinyY,delay:
((theGround.y<theGroundDestinyY)?0:0.5) , ease:Expo.easeOut});
//////////////////////////////////////////////////////*The folowing
line is encharged of relocate the holder of the sections and the menu
and is The_MasterCont what run away when the google API is ready
depending on the zoom value of the setCenter.*/
TweenLite.to(The_MasterCont,1,{x:theMasterContX,y:theMasterContY,
ease:Expo.easeOut});
}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
This is the code inside the class that creates the map
var mapCont:Sprite=new Sprite() ;
The_mapCont=mapCont;
The_section.addChild(mapCont);
var map:Map = new Map();
mapCont.addChild(map);
The_map=map;
map.key ="the number that I got";
The_map.setSize(new Point(300, 300));
The_map.addEventListener(MapEvent.MAP_READY, onMapReady,false);
function onMapReady(event:MapEvent):void {
The_map.removeEventListener(MapEvent.MAP_READY,
onMapReady,false);
The_map.x=0;
The_map.y=0;
/////////////////////////////////// The following line
crash the The_MasterCont position and the resize handler because the
zoom value
The_map.setCenter(new LatLng(40.427022,-3.757925), 2,
MapType.NORMAL_MAP_TYPE);
//////////////////////////////////
The_map.addOverlay(new Marker(new LatLng(40.427022,-3.757925)));
The_map.addControl(new OverviewMapControl());
The_map.addControl(new MapTypeControl());
The_map.addControl(new PositionControl());
The_map.addControl(new ZoomControl());
}
Any Idea now?
--
You received this message because you are subscribed to the Google Groups
"Google Maps API For Flash" group.
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.