3 Replies Latest reply on Sep 8, 2007 5:57 AM by Greg Dove

    Refresh problem for swf website

      I have a web site which is swf movies based on html. to be refreshed (the swfs) every time I re-ender it(not every 10 or 20 seconds). Think of it like a news site which needs to be refreshed constantly to keep up to date. What coding should I use?Should it be on the html page or in the swf?

      It loads the swf from the cashe of the browser even when I have made changes to the server files.

      Please I need some help
        • 1. Re: Refresh problem for swf website
          Greg Dove Level 4
          If you have changing information that you display inside a swf then normally you would get the swf to make requests periodically to avoid the html page refreshes.

          You would normally have the swf request data in either name/value pair encoded format (LoadVars) or XML (XML class) as an example.

          In flash/actionscript you can append a random or timer based querystring parameter to the url that returns the updates to avoid browser cacheing.

          e.g. something like the following in actionscript

          • 2. Re: Refresh problem for swf website
            djdrek Level 1
            the problem is that I dont use any xml, php or external files. I just want the swfs to be reloaded from the original file from the server every time someone re-enders the page.
            • 3. Re: Refresh problem for swf website
              Greg Dove Level 4
              Do you mean that the 'news' or 'updates' are actually made to the swf file itself?

              That would be unusual for a data driven site although its not impossible. There's even a reasonably 'new' data exchange format based on a simplified swf format that is used for loading data. But it doesn't sound like that's what you're doing.. it seems like you want to reload the original swf itself. I hope thats via some CMS or something that's generating the swf files. Its seems impractical for a 'news' type site otherwise.

              Either way I imagine you can reload the swf into the _root level. You might need to use the same type of anti-cacheing approach as before.


              How often you do that... well that would depend on how often you think it would change. AFAIK there's no way to know if the file on the server has physically changed without polling the server separately e.g. via LoadVars .