# Google request from remote swf

**URL:** <https://forum.kirupa.com/t/google-request-from-remote-swf/327410>\
**Category:** flash\
**Created:** [February 27, 2012, 6:15pm UTC](https://forum.kirupa.com/t/google-request-from-remote-swf/327410 "2012-02-27T18:15:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jtvalles](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jtvalles](https://forum.kirupa.com/u/jtvalles)\
**Post date:** [February 27, 2012, 6:15pm UTC](https://forum.kirupa.com/t/google-request-from-remote-swf/327410/1 "2012-02-27T18:15:30Z")

</div>

I am trying to return a Google Places request with this code. It works in preview testing, but will not return results when the swf is remotely hosted. I know swfs have security measures in place when it comes to importing data.

Is this possible with Flash?

var googleSearchArray:Array = new Array();  
var jsonGoogleRequest:URLRequest = new URLRequest(“[https://maps.googleapis.com/maps/api/place/search/json?userip=63.98.25.109&location=33.006688,-96.703257&radius=40233.6&name=symon&sensor=false&key=AIzaSyB\_u-ehd2WBol6-JqZjxmaQoSc2S3y75XY](https://maps.googleapis.com/maps/api/place/search/json?userip=63.98.25.109&location=33.006688,-96.703257&radius=40233.6&name=symon&sensor=false&key=AIzaSyB_u-ehd2WBol6-JqZjxmaQoSc2S3y75XY)”);  
var jsonGoogleLoader = new URLLoader();  
jsonGoogleLoader.addEventListener(Event.COMPLETE, onGoogleload);  
jsonGoogleLoader.load(jsonGoogleRequest);

```
    function onGoogleload(evt:Event):void {
    var jsonGoogleSearch: Object = JSON.decode(jsonGoogleLoader.data);
    
    for (var i:int = 0; i &lt; jsonGoogleSearch.results.length; i++) 
        {
            
        googleSearchArray.push("https://maps.googleapis.com/maps/api/place/details/json?reference="+jsonGoogleSearch.results*.reference+"&sensor=true&key=AIzaSyB_u-ehd2WBol6-JqZjxmaQoSc2S3y75XY");
        trace(googleSearchArray*)
        }

```

}
