PDA

View Full Version : Sandbox violation Help Please!!!



haejeanson
September 26th, 2008, 05:49 PM
Hi!

I'm building a flash fullscreen slideshow that populates with an xml file. The flash is parsing the xml by calling a variable in the flashvar of the object tag in the html. Everything works great. I even put it up on my test site and everything is working great. But when I changed the image path in the xml to have full url from a crossdomain, i get a sandbox error. But the strange thing is when i load the site on my server, I can see the images being loaded, but the flash is not seeing my code to resize my UILoader and to position all the thumbnails. You can see my flash site here: my flash sample (http://haejeanson.com/personal/fullscreenTest/FullScreenSlideshow.html)

What I've tried... I tried including the crossdomain.xml.

import flash.display.LoaderInfo;
import flash.system.Security;
var flashVars= this.loaderInfo.parameters;

Security.loadPolicyFile("http://mydomain.com/crossdomain.xml");
photoViewer.loadAllXMLData(flashVars.xmlUrl);
photoViewer.loadAllConfigData(flashVars.configUrl) ;I've also import

import flash.system.LoaderContext;
myContext = new LoaderContext();
myContext.checkPolicyFile = true;

var urlReq:URLRequest = new URLRequest(images[currItemNum]);
mainPicLoader.load(urlReq, myContext);This has not helped! Any ideas? Please help! Thanks so much:D

Haej

creatify
September 26th, 2008, 07:00 PM
if I follow correctly, you're crossdomain.xml files needs to be placed on the root of the server where the images exist - does it live there?

haejeanson
September 29th, 2008, 04:29 PM
Hi!

Thanks for getting back to me so quickly. Actually the images I am calling in the my "album.xml" are located on various servers. We are creating a slideshow with actionscript 3.0 where users can enter links from different urls to the albums xml. So the crossdomain.xml is actually located on my server where the SWF is loaded. Is this the wrong way to do things? Please let me know! Thanks so much!

Haej