all groups > flash data integration > april 2006 >
You're in the

flash data integration

group:

Load Remote XML


Load Remote XML Phomari7
4/12/2006 5:42:31 PM
flash data integration:
I am trying to get my flash app to read a continuously-updated xml file from a
remote location.

-The xml file on my server changes constantly so my flash app needs to be
reading it continually, kind of like a ticker.

-My app is able to load the xml file correctly the first time, but thereafter
appears to not be refreshing the xml file. The onLoad() function is
successful, but the data is old.

-The flash app works perfectly when I run it from the same machine the xml
file is on, so maybe it has to do with security.

-I do have a crossdomain.xml file on my server. Anyway, the flash app gets
the xml file the first time, but never gets the updated ones.

-My remote server (SitePlayer) is embedded in hardware and does not support
server-side programming like PHP.

-I am testing with Mozilla FireFox on WinXP Pro so no IE issues here, although
I guess I'll have to take those on at some point.

Thanks very much for the help.

-jheske







Re: Load Remote XML Motion Maker
4/13/2006 5:41:03 PM
You are probably battling cache problems.

mySend_xml.sendAndLoad(http://thedomain/the.xml?nocache=" + new
Date().getTime() , myReply_xml);


--
Lon Hosford
www.lonhosford.com
May many happy bits flow your way!
[quoted text, click to view]
I am trying to get my flash app to read a continuously-updated xml file
from a
remote location.

-The xml file on my server changes constantly so my flash app needs to be
reading it continually, kind of like a ticker.

-My app is able to load the xml file correctly the first time, but
thereafter
appears to not be refreshing the xml file. The onLoad() function is
successful, but the data is old.

-The flash app works perfectly when I run it from the same machine the xml
file is on, so maybe it has to do with security.

-I do have a crossdomain.xml file on my server. Anyway, the flash app gets
the xml file the first time, but never gets the updated ones.

-My remote server (SitePlayer) is embedded in hardware and does not support
server-side programming like PHP.

-I am testing with Mozilla FireFox on WinXP Pro so no IE issues here,
although
I guess I'll have to take those on at some point.

Thanks very much for the help.

-jheske








Re: Load Remote XML Phomari7
4/14/2006 1:20:14 PM
Thanks very much for the response. I figured it was something like that. Is this a browser problem? Any idea why clicking refresh in browser doesn't force the xml to update?

Re: Load Remote XML Motion Maker
4/14/2006 5:52:02 PM
Caching is an internet problem that includes the browser as a potential
culprit.

Look in the browser menus to clear either temporary files or the cache.

You can look in IE Tools->Internet Options and the General tab.
The DeleteFiles button clears the cache, but hold on before you do that,
because if you are like me I like typing parts of a URL in and having them
auto complete.

Then look at the Settings button and you can get an idea what can become a
problem for the browser.

For FireFox look at Tools->Clear Private Data or Tools->Options->Privacy and
the cache tab for more details.

Generally the effort to thwart caching issues includes the item I posted and
using server side often through scripting to inform the internet that the
cached files should not be used.


--
Lon Hosford
www.lonhosford.com
May many happy bits flow your way!
[quoted text, click to view]
Thanks very much for the response. I figured it was something like that.
Is this a browser problem? Any idea why clicking refresh in browser doesn't
force the xml to update?

-jheske

Re: Load Remote XML caiblack
5/1/2006 9:35:38 PM
I am experiencing a similar issue. I added the querystring with date-time
stamp to my XML file path and, in general, this works fine. However, I am
seeing issues with some users where the SWF appears to not load the XML. It
just sits there. It works on some machines and yet not on others. It will not
load the XML until it has a chance to sit there for 3 to 5 minutes.

Now, if I click a link on the HTML page and then the link back to that
homepage (where the Flash is located) it works prefectly.

What the heck is up with that?!?

Re: Load Remote XML caiblack
5/1/2006 10:26:08 PM
Hahaha ... the HTML from created by someone else and they had a external
JavaScript tag that was hosing things.

So, the upshot is that the HTTP protocol hack (adding a querystring to a
request for an XML file) works perfectly. I also used that same technique in
conjunction with a script I downloaded from Adobe/Macromedia to coounteract the
non-automatic loading of Active X content in IE ... I added the hack listed
above to the javascript.
AddThis Social Bookmark Button