PDA

View Full Version : Refresh webpage?



iamthwee
February 8th, 2009, 05:18 PM
Ok, basically I have a flash application that is reading an xml file across a server.

The xml file changes when the user edits something in the flash application.

What is the best way to refresh the page to respond to the changes made to the file.

Should I refresh the page, by calling the same url again?

Should I use a javascript option.
http://board.flashkit.com/board/showthread.php?t=703262

Or is there like a


isFileChanged()

event listener I can use. Any professional advice would be great?

.ral:cr
February 8th, 2009, 06:15 PM
you should refresh only the part of the application that depends on the xml. you create a custom event listener for the changes, you delete that module and create it again.

iamthwee
February 9th, 2009, 08:41 AM
Thanks but I am new to this.


How would I reload the xml file? Would it be something like?


my_xml.load("testFile.xml?cachebuster=" + new Date().getTime());

This would happen after the user clicks on a save button.


Thank you in advance.