Take the 2-minute tour ×

I'm embedding the Google Maps Flash API in Flex and it runs fine locally with the watermark on it, etc. When I upload it to the server (flex.mydomain.com) I get a sandbox security error listed below:

SecurityError: Error #2121: Security sandbox violation: Loader.content: http://mydomain.com/main.swf?Fri, 12 Sep 2008 21:46:03 UTC cannot access http://maps.googleapis.com/maps/lib/map_1_6.swf. This may be worked around by calling Security.allowDomain.
    at flash.display::Loader/get content()
    at com.google.maps::ClientBootstrap/createFactory()
    at com.google.maps::ClientBootstrap/executeNextFrameCalls()

Does anyone have any experience with embedding the Google Maps Flash API into Flex components and specifically settings security settings to make this work? I did get a new API key that is registered to my domain and am using that when it's published.

I've tried doing the following in the main application as well as the component:

share|improve this question

2 Answers 2

This sounds like a crossdomain.xml related problem. I did a quick search and there seems to be many people with the same issue. Some proxy requests through XMLHttpRequest etc..

Issue 406: Add crossdomain.xml for Google Accounts

share|improve this answer

Thanks for the help. Apparently this has something to do with including the Flex app on an ASP.NET page. When I moved it over to a flat HTML file, it worked fine. I don't have time to fully investigate right now, but that seems to have fixed it.

share|improve this answer

Your Answer


