I just started using the Google Maps API for Flash (map_1_20.swc) for an AIR 2.5 application that I create using Flash CS5. everything loads and displays normally in ADL, except that I get security violations in the sandbox:
*** Security Sandbox Violation *** SecurityDomain 'http://maps.googleapis.com/mapsapi/publicapi? file=flashapi&url=http%3A%2F%2FgMyDomainName.com&key=ABQIAAAAKlbBGDLCUgZLtxxJ6- Hi9RQ7KOBhSjQi3kzVUu2XaSyicmBCGxQz68ixtUMxnYSMDFuMNT0cJYPwjQ&sensor=false&v=1.20&fl pub=&flh=17e8cb187dcf0488fac63df6b16432b7592443ee&flc=at&flcl=a0g30ufvvrvvtvvbo03' tried to access incompatible context 'app:/MapTest.swf'
A sandbox security violation is thrown when we insert the mouse into or from the infoWindow window.
here is my code for the document class
package { import com.google.maps.LatLng; import com.google.maps.InfoWindowOptions; import com.google.maps.Map; import com.google.maps.MapEvent; import com.google.maps.MapType; import flash.display.Sprite; import flash.events.Event; public class MapTest extends Sprite { public function MapTest() { addEventListener(Event.ADDED_TO_STAGE, init); } private function init(evt:Event):void { removeEventListener(Event.ADDED_TO_STAGE, init); var map:Map = new Map(); map.key = "ABQIAAAAKlbBGDLCUgZLtxxJ6-Hi9RQ7KOBhSjQi3kzVUu2XaSyicmBCGxQz68ixtUMxnYSMDFuMNT0cJYPwjQ"; map.url = "http://MyDomainName.com";
}
flash air google-maps google-maps-api-3
TheDarkIn1978
source share