AS3 security can be further enhanced AH, has not let me access the other fields under the things.
Officially, the server needs to be licensed and crossdomain.xml, but of course we can't put something in someone else's server (at least not my level)!
After discussing with Harry, because PHP has no Cross-domain concept (requires server permission), it can be relayed through PHP to enable Cross-domain access. (asp,jsp is similar, here is not to talk about, because I will not)
Because this evening also has the class, therefore first hastily writes the approximate idea.
This thing can only call JPG files, PHP server-side need GD library.
Other things have time to do later.
PHP Side:
$imgPath = The security of the AS3 can be further enhanced AH, no longer let me access the things under the other domain.
Officially, the server needs to be licensed and crossdomain.xml, but of course we can't put something in someone else's server (at least not my level)! The
is discussed with Harry because PHP has no Cross-domain concept (requires server permission), so it can be relayed through PHP to enable Cross-domain access. (Asp,jsp is also similar, here is not to talk about, because I do not )
Because of the class tonight, so the first cursory write about the idea.
This thing can only call JPG files, PHP server-side need GD library.
Other things have time to do later.
php-side:
___fckpd___0
post[' url ';
Function Imagecreatefromjpegex ($file)
{
$data = file_get_contents ($file);
$im = @imagecreatefromstr ING ($data);
$i = 0;
while (! $im)
{
$data = Substr_replace ($data, "", -3,-2);
$im = @imagecreatefromstring ($data);
}
return $im;
}
$im = Imagecreatefromjpegex ($imgPath);
Imagejpeg ($im);
Flash calls methods:
Function Loadimg (e:mouseevent): void
{
//imgmovieclip for movieclip that need to load pictures. At present, it seems not possible to use the built-in component Uiloader to read ...
var imgurlrequest:urlrequest = new URLRequest (' get_images.php ');
var imgurlloader:urlloader = new Urlloader (imgurLrequest);
var imgloader:loader = new Loader ();
var imgurl:string = Url_input.text;
var imgurlvariable:urlvariables = new Urlvariables ();
//
Imgurlvariable.url = Imgurl
//imgurl is the URL that requires a cross domain access to the picture
//
Imgurlrequest.data = imgurlvariable;
Imgurlrequest.method = Urlrequestmethod.post;
//urlrequestmethod to use post
//
Imgloader.load (imgurlrequest);
Imgmovieclip.addchild (Imgloader);
}