Hi,
I have a site fully designed using as3 classes. My design is based on
a liquid layout. All the assets and elements dinamicly generated are
inside a container. When the browser resizes, the container relocates
itself in a determinate position.
I put the google API inside a Sprite as a holder. This holder is
generated dinamicly. When the API is visible and the browser resizes,
all the content moves away.
If the zoom value of the setCenter method is 1, the map center itself
on the browser, avoiding any method.
If the value is higher, the content goes away according to the zoom
value.

Exist any conflict between this api and the resize stage event?
How is possible to avoid the api takes control over the movie?


this is the code in the main class that controls resize and
relocating


///////////////////////////////////////////////////////////////////////////­//////////////////////////////////////
public function resizeStage(e:Event):void {


//// in the stage theres several assets and no one suffers de google
API effect but The_MasterCont


        stageW =  root.stage.stageWidth;
                stageH  =  root.stage.stageHeight;
        theGradient.width   =   stageW;
        theGradient.height  =   stageH;


                ////// The_MasterCont is the holder of the menu and
sections and
               //////  run away when the Google API is visible and
the
browser resizes


        var theMasterContX:int  =   (stageW/2)-(The_MasterCont.width/
2);
        var theMasterContY:int=stageH/6;


                /////The ground is an asset in the stage


        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});
             TweenLite.to(The_MasterCont,1,
{x:theMasterContX,y:theMasterContY, ease:Expo.easeOut});
        }



}


///////////////////////////////////////////////////////////////////////////­//////////////////////////////////////

here the code in 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 key"; // I got the number...
                        The_map.setSize(new Point(300, 300));
                        The_map.addEventListener(MapEvent.MAP_READY,
onMapReady,false,
0,true);


////////////////////////////////////////////////////////////////////


function onMapReady(event:MapEvent):void {
        The_map.removeEventListener(MapEvent.MAP_READY,
onMapReady,false);
        The_map.x=0;
        The_map.y=0;
        The_map.setCenter(new LatLng(40.427022,-3.757925), 2,
MapType.NORMAL_MAP_TYPE);


////Depending on the zoom value, The_MasterCont moves away more or
less.


        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?


Thanks,RO


--

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.


Reply via email to