Hello everyone,
This is my first post in the Kirupa forum and I need some major help!
I am working on a flash widget that displays other items I am selling in a gallery format within an eBay listing page. The widget worked fine in AS 2.0 but now that I am converting it to AS 3.0 I am having problems. When working in Adobe Flash and previewing the widget, it works just fine, however when I preview it from any live webpage or eBay listing page, the xml never seems to load. I have a feeling this is a security issue. I have also searched google and found many hints as to how to use a crossdomain.xml file to allow this to work but I still have had no success. I have a crossdomain.xml file in the location specified below, and this is the code portion that I think is failing to execute for some reason.
Please take a look and let me know if you have any suggestions, i’m STUCK!
var url = 'http://subdomain.domain.com/file.xml?user=101';
var loader:URLLoader = new URLLoader();
Security.loadPolicyFile('http://subdomain.domain.com/crossdomain.xml');
loader.load(new URLRequest(url));
var onReady = function(evt:Event) {
var xml = new XML(loader.data);
doSomething(xml);
}
loader.addEventListener(Event.COMPLETE,onReady);