I add my map to my application dynamically, eg like this: var map:Map = new Map(); map.key = "ABQIAAA... etc"; map.width = 800; ... etc someCanvasOnMyApplication.addChild(map);
This allows me to set the map key dynamically. I then use this.root.loaderInfo.loaderURL to get the URL that the swf was loaded from. I then extract the domain from that URL, and use the appropriate key which matches that domain. You could also just have your html use an absolute URL to one of your domains. So instead of: <embed src="myapp.swf"> Use: <embed src="http://www.originaldomain.com/myapp.swf"> That way the swf is always loaded from the same domain even if the html page which contains it is on a different domain. Saxon On Apr 28, 6:55 am, Giannis <[email protected]> wrote: > Thank you very much i will try it ! > If anyone else has other suggestions, please , feel free to post :) > On Apr 28, 1:15 am, Luke Mahé <[email protected]> wrote: > > > > > > > Hey, > > > You can find the current domain in javascript by looking at the > > 'document.domain' variable. > > > So you should be able to write something like: > > > if (document.domain == 'my.domain.com') { > > // Create the output with the key for my.domain.com} else { > > > // Create the output for the other domain > > > } > > > // Write the output. > > > Hope this helps > > > - Luke > > > On Tue, Apr 27, 2010 at 12:47 PM, Giannis <[email protected]> wrote: > > > Anyone knows the javascript script that i will be able to use for the > > > flash google map into 2 domains? > > > > -- > > > 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]<google-maps-api-for-flash%[email protected]> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-maps-api-for-flash?hl=en. > > > -- > > 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 > > athttp://groups.google.com/group/google-maps-api-for-flash?hl=en. > > -- > 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 > athttp://groups.google.com/group/google-maps-api-for-flash?hl=en.- Hide > quoted text - > > - Show quoted text - -- 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.
