AS3 accessing other domains
I have a AS3 swf that scrapes google images for a search query and displays some of the results. It wor开发者_运维知识库ks locally, but when the swf is on a server it can't access google. I've tried Security.allowDomain, but it doesn't work. Any suggestions?
Google's crossdomain.xml might be preventing you from accessing it. Try their Ajax Search API together with ExternalInterface instead. Even then, you can't access the images in search results if third party sites doesn't have a crossdomain policy file that allows your domain to access files from there.
One suggestion would be to use a server script to retrieve the requests (i.e. loadImage.php?url=http://....) but its very demanding for the server (as it has to download the files and then send them to the client)... depending on your needs some cache system could help...
精彩评论