Difference between revisions of "Flash and XML"
From Wikicliki
Line 1: | Line 1: | ||
− | This might be trivial but I realised that this doesnt work | + | This might be trivial but I realised that this doesnt work with loading an XML periodically (not even with a setInterval to do it every few seconds) |
<pre> | <pre> | ||
− | function | + | function loadXML(evt:Event):void |
{ | { | ||
Line 14: | Line 14: | ||
<pre> | <pre> | ||
− | function | + | function loadXML(evt:Event):void |
{ | { | ||
var spoofNum:String = String (new Date().getTime()); | var spoofNum:String = String (new Date().getTime()); |
Latest revision as of 15:36, 19 June 2012
This might be trivial but I realised that this doesnt work with loading an XML periodically (not even with a setInterval to do it every few seconds)
function loadXML(evt:Event):void { var pocketLoader:URLLoader = new URLLoader(); pocketLoader.load(new URLRequest("http://domain/getlast10items.php)); pocketLoader.addEventListener(Event.COMPLETE, processXML); }
but this works (adding a spoofed variable at the end)
function loadXML(evt:Event):void { var spoofNum:String = String (new Date().getTime()); var pocketLoader:URLLoader = new URLLoader(); pocketLoader.load(new URLRequest("http://domain/getlast10items.php?spoofNum="+spoofNum)); pocketLoader.addEventListener(Event.COMPLETE, processXML); }
don't know why... but it solved my problem. It only occurs on windows but not on mac.