You cannot put a crossdomain.xml on other people's servers so heres a
php trick to use remote images:
as3:
var myLoaderContext:LoaderContext = new LoaderContext();
myLoaderContext.checkPolicyFile = true;
var picURL:String = photo_file_url;
_assetLoader.add(imgStream+picURL,{id:"img"+i,type:"image",context:
myLoaderContext});
********************************
picURL = panoramio json data for photo_file_url
imgStream = my php file that echoes the panoramio image:
<?php
$post_data = $HTTP_RAW_POST_DATA;
$header[] = "Content-type: image/jpeg";
$header[] = "Content-length: ".strlen($post_data);
$ch = curl_init( $_GET['img'] );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
if ( strlen($post_data)>0 ){
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
}
$response = curl_exec($ch);
if (curl_errno($ch)) {
print curl_error($ch);
} else {
curl_close($ch);
print $response;
}
?>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---