# XML: run function when data in XML file changes

**URL:** <https://forum.kirupa.com/t/xml-run-function-when-data-in-xml-file-changes/284685>\
**Category:** flash\
**Created:** [March 22, 2009, 11:24am UTC](https://forum.kirupa.com/t/xml-run-function-when-data-in-xml-file-changes/284685 "2009-03-22T11:24:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JYCaR](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@JYCaR](https://forum.kirupa.com/u/JYCaR)\
**Post date:** [March 22, 2009, 11:24am UTC](https://forum.kirupa.com/t/xml-run-function-when-data-in-xml-file-changes/284685/1 "2009-03-22T11:24:47Z")

</div>

Hey guys…

So, my situation is like this:  
I have an XML file.  
I load the file to flash and display data.  
But this XML file can be changed by some other system, updates data,…  
Now, i want to update my data in flash also.  
What i have done is use timer and check XML file every… let’s say second.  
And i don’t wanna do that…

I just want to know what the data in XML file changed and update at that time, otherwise do nothing.

So, i was wondering if that is possible. Is it possible for AS3 to get an event or something, when XML file changes.

I know i could do that with FMS or Red5 and shared objects… but let’s say that that is not the best option in our case.

So, can I listen to changes in XML file??

If you know… please let me know… 🙂  
thanks…
