Jump to content
  • Advertisement
Sign in to follow this  
Alessandro

[web] Any Flex/Actionscript developer here ?

This topic is 4006 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have this odd problem ... I have a very simple routine (see code below) that load an XML file and display its first "record" in a label:
private function LoadXmlFile():void 
{ 
var loader:URLLoader = new URLLoader(); 
var request:URLRequest = new URLRequest("loadXML.xml"); 
loader.load(request); 
loader.addEventListener(Event.COMPLETE, onComplete); 
} 


private function onComplete(event:Event):void 
{ 
var loader:URLLoader = event.target as URLLoader; 
if (loader != null) 
{ 
xml = new XML(loader.data); 
DebugLabel.text=xml.child("name").text()[[0]] + "," + xml.child("surname").text()[[0]]; 
} 
} 


private function reload():void 
{ 
LoadXmlFile(); 
} 


The odd thing is that if I modify the xml data locally (in the project hard drive folder), and then I reload the file with the reload() function, the file is correctly reloaded and new content is displayed. Same behaviour does not apply if I upload the project to a web server: when I click on the reload button, even if I previously modified the xml file, it always show the old content, instead of reloading the new one. Any idea ?

Share this post


Link to post
Share on other sites
Advertisement
i would say it has to do with the browser caching
http://www.communitymx.com/content/article.cfm?cid=827EA

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!