I've tried to use the tutorial for Flash, but I can't the SWF to work
if the Key is specified inside the Flex Project. This is my Flex
Project:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute">
<maps:Map xmlns:maps="com.google.maps.*" id="map"
mapevent_mapready="onMapReady(event)" width="100%" height="100%"
        
key="ABQIAAAARGotm5eVWaP9RywS39a2OxTLaRh2DaJVotW9w5N3faj5xqFtQhSOfIzCddlmV60IOCbx7zVcec7Cbw"/
>
<mx:Script>
    <![CDATA[

    import com.google.maps.LatLng;
    import com.google.maps.Map;
    import com.google.maps.MapEvent;
    import com.google.maps.MapType;

    private function onMapReady(event:Event):void {
      this.map.setCenter(new LatLng(40.736072,-73.992062), 14,
MapType.NORMAL_MAP_TYPE);
    }
    ]]>
</mx:Script>
</mx:Application>

And this is the HTML:

<html xmlns="http://www.w3.org/1999/xhtml";>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/
>
    <title>Google Maps JavaScript API Example</title>
  </head>
  <body onload="initialize()" onunload="GUnload()">
  <div id="map_canvas" style="width: 500px; height: 300px"></div>
  <div id="map_canvas" name="map_canvas">
    <object
      classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
      codebase="http://download.macromedia.com/pub/shockwave/cabs/
flash/swflash.cab#version=6,0,29,0"
      width="800px"
      height="600px">
      <param name="movie" value="Maps.swf">
      <param name="quality" value="high">
      <param name="flashVars"
value="key=ABQIAAAARGotm5eVWaP9RywS39a2OxTLaRh2DaJVotW9w5N3faj5xqFtQhSOfIzCddlmV60IOCbx7zVcec7Cbw">
      <embed
        width="800px"
        height="600px"
        src="Maps.swf"
        quality="high"
 
flashVars="key=ABQIAAAARGotm5eVWaP9RywS39a2OxTLaRh2DaJVotW9w5N3faj5xqFtQhSOfIzCddlmV60IOCbx7zVcec7Cbw"
        pluginspage="http://www.macromedia.com/go/getflashplayer";
        type="application/x-shockwave-flash">
      </embed>
    </object>
  </div>

  </body>
</html>

If I use the HTML like this, with the Flashvars specified in the HTML
explicitly, everything works fine, and Flash component shows the map.
If I comment the lines with Flashvars, the component doesn't work, and
throws the API key error. This seems to mean that specifing the key
inside the Flex Project isn't working. Without external key, it
fails.

For my particular scenario I can't really use Flashvars tags, so I
have to rely on the key specified inside the SWF. What am I doing
wrong? My test domain is http//vmware.

Thanks in advance.

JS

-- 
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