0

By default images from remote domains are not accessible or smoothed without the remote server adding a policy file. I remember in another project we were able to enable smoothing in these situations. We had to set or add the remote domain to trusted domains array. I don't have this code anymore and I can't remember how we did it. Does someone know what I'm talking about and how to enable it?

More context
Add this code to your Flex Application:

<s:Image id="myImage" source="https://www.google.com/images/srpr/logo3w.png" smooth="true" height="200" width="400" />

and run it in the browser. If you run it from file:// it should show the image smoothed. enter image description here

That's because Flash Builder gives it special permissions during development. If you put it on a server, for example, http://localhost:8888/Project-debug/Project.html, you'll see it is not smoothed and errors are shown in the console:

enter image description here

Error: Request for resource at https://www.google.com/images/srpr/logo3w.png by requestor from http://localhost:8888/Project-debug/Project.swf/[[DYNAMIC]]/3 is denied due to lack of policy file permissions.

*** Security Sandbox Violation ***
Connection to https://www.google.com/images/srpr/logo3w.png halted - not permitted from http://localhost:8888/Project-debug/Project.swf
Error: Request for resource at https://www.google.com/images/srpr/logo3w.png by requestor from http://localhost:8888/Project-debug/Project.swf/[[DYNAMIC]]/3 is denied due to lack of policy file permissions.
zero323
  • 322,348
  • 103
  • 959
  • 935
1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231

1 Answers1

0

it should work if you load the image as

[Bindable]
var bmp : Bitmap = Bitmap( imgLoader.content );

and then apply

bmp.smooth = true;

, and then use bmp as binding source for your image.

Yordan Yanakiev
  • 2,546
  • 3
  • 39
  • 88