PDA

View Full Version : xml browser bug. very odd



brndn
October 31st, 2008, 01:22 PM
Hi All
Am just banging my head against the wall trying to figure out why this is pulling the xml data in locally and on some computers and not on others when stored on the server.
for example
my FF3.0.3 and IE7 work fine with flash player 9
my coleauge can view in IE7 flash player 9 but not in FF flash player 9

This issue has a 50% fail rate very odd.


Is my method causing issues here or something.

any help would be much appriciated.

brndn



//---------loading the external xml file-------
var urlRequest:URLRequest = new URLRequest("http://ir1.euroinvestor.com/asp/ir/xmlirmultiiso2.aspx?companyid=2811234");
var urlLoader:URLLoader = new URLLoader();
var myXML:XML = new XML();
var xmlList:XMLList;
myXML.ignoreWhitespace = true;
urlLoader.addEventListener(Event.COMPLETE,fileLoad ed);
urlLoader.addEventListener(IOErrorEvent.IO_ERROR, onIOError, false, 0,
true);

urlLoader.load(urlRequest);


function fileLoaded(event:Event):void {
myXML = XML(event.target.data);
xmlList = myXML.children();
trace(xmlList.child(6));
DATATXT.text = xmlList.child(6)+"p";
}


function onIOError(evt:IOErrorEvent):void {
DATATXT.text = String(evt);
}

creatify
October 31st, 2008, 03:22 PM
What is getting traced out, if anything - undefined, or is the complete handler not even firing. That should be a simple test to determine if your xml is getting loaded or not. just add your traces to a textField on the stage, or download the adobe debug players and then get the Thunderbolt AS3 console (http://code.google.com/p/flash-thunderbolt/wiki/ThunderBoltAS3).

Your swf is hosted at the same server correct? If not could be a crossdomain issue though that should be consistent - ie, it won't ever work without a crossdomain.xml policy file on the server hosting the xml.

Also, are you preloading your swf? Make sure your textField has loaded prior to your xml call being made, that seems like it shouldn't be the problem, but it could be.

Hope this helps.