views:

1860

answers:

1

OK I have an application that loads product images using the < mx:Image /> tag and changing the source. the .SWF is on the http side of the website and the images are on the https side of the site. so at first I was getting this error:

SecurityError: Error #2122: Security sandbox violation: Loader.content: http://www.MYDOMAIN.com/Masonic.swf cannot access https://www.MYDOMAIN.com/masonic_images/13_red_d2-MAS72479bl_red.jpg. A policy file is required, but the checkPolicyFile flag was not set when this media was loaded. at flash.display::Loader/get content() at SmoothImage/http://www.adobe.com/2006/flex/mx/internal::contentLoaderInfo_completeEventHandl er()

So after some research I found this article: http://www.damienking.net/tutorial-using-remotely-hosted-images-flex I did what it said and I am now getting this similar error:

SecurityError: Error #2123: Security sandbox violation: Loader.content: http://www.MYDOMAIN.com/Masonic.swf cannot access https://www.MYDOMAIN.com/masonic_images/12_red_d2-MAS60338bl_red.jpg. No policy files granted access. at flash.display::Loader/get content() at SmoothImage/http://www.adobe.com/2006/flex/mx/internal::contentLoaderInfo_completeEventHandl er()

Also after I click dismiss to the error box that pops up, the images do load afterwards, but are then set to the size of the actual image not the width and height I set the component to. I have no clue what to make of that.

Any help is appreciated.

THANKS!

A: 

I was able to get it to work by using a proxy, via the instructions on this article: http://raghuonflex.wordpress.com/2007/10/11/jsp-proxy-code-for-sourcing-cross-domain-images/?referer=sphere_related_content/ I think the images load slower and its probably not the ideal solution but at least it works now and thats better than nothing.

John Isaacks