Hi All - I have an interesting thing happening. I have used the loader object in AS3 to load in images from a web server. During development this worked very well. The application would submit a keyword to the web server and get a returned set of thumbnails back to the flash application.
I have now moved these files to the web server to be tested and the images do not show up anymore. The strange thing is that I can see them loading in through Safari’s Activity window every time I submit a new keyword. Any thoughts on this would be greatly appreciated. Thank you.
-b
swf and content mast to be
same site.
Send swf to web server (thumbnails hi has). Or security error.
Thanks Alex - I looked further into what could be causing this problem. Looks like it may be sandbox violation. The application is loading images from a sub-domain which does not currently have the crossdomain.xml file at its root so my app which is above it can not access content as data (target.content).
The main domain [foo.com] does have a crosspolicy domain file which covers the subdomains [*.foo.com] but it looks like flash is looking for it in the root of the sub domain [images.foo.com].
I’m wondering if you or anybody else can see any additional problems with this solution.
I added the following:
private var context:LoaderContext = new LoaderContext();
context.checkPolicyFile = true;
and then in loader.load() I call the context.
loader.load(request, context);
It now throws an error in the browser’s activity window stating that it cannot find the crossdomain.xml file at the sub domain where the images are being requested from.
I found some good help on the topic here:
http://team.bkwld.com/?author=4#post-95 as well as a post from senoculer.
As I don’t currently have access to this sub-domain I can not add the cross policy domain file to test if I have found a solution. I will have to do so tomorrow.
Thanks.
-b
Update - one of the developers was able to to place the cross policy domain file on the root of the sub domain and now the images being loaded in.
NOTE TO OTHERS - cross policy domain files are no longer read in by default as was the case in AS2.
-b