Groups | Blog | Home
all groups > flash (macromedia) > march 2004 >

flash (macromedia) : refresh a Flash file?


cruise95
3/31/2004 10:09:59 PM
Hello,

does anybody know how to refresh a FLASH file and/or flush all data? I am
currently using Flash to talk to a ColdFusion file - this file retrieves data
from a database and sends the results back to Flash. Everything works good on
the file, but when I edit the database in Flash, the FLASH file does not reset
and show the new data. Upon clicking a button, you are sent to (via
gotoAndPlay(1)) frame 1 where loadVariablesNum is called again, yet it seems to
continue using the old data.

The FLASH file seems to cache after rendering the page. The only way to see
the new Data populate on the Flash file is to closing the browser and reopen it
again (or manually refresh the screen).

Is there a way to flush a FLASH file of old data and be able to see the new
data while still playing the file?

Thanks
Carl Fink
3/31/2004 10:27:39 PM
[quoted text, click to view]
the old data.

[quoted text, click to view]

Posted and answered many times. You need to instruct the browser not to cache
the page the variables are embedded in. (I encountered the same problem with
an XML file.) Here's the PHP script I use, which I'm sure you can adapt to
ColdFusion.

<?
header("Expires: Mon, 1 Jul 1997 05:00:00 GMT");
header("Last-Modified:" . gmdate ("D, d M Y H:i:s") . "GMT");
header ("Cache-control: no-store, no-cache, must-revalidate");
header ("Cache-control: post-check=0, pre-check=0", false);
header ("Pragma: no-cache");
readfile("glossary2.xml");
exit;
?>
cruise95
3/31/2004 11:49:54 PM
Thank you

cruise95
4/1/2004 12:25:27 AM
I looked up something on headers...and then added this code:

<cfoutput>
<CFSET gmt = gettimezoneinfo()>
<CFSET gmt = gmt.utcHourOffset>
<CFIF gmt EQ 0>
<CFSET gmt = "">
<CFELSEIF gmt GT 0>
<CFSET gmt = "+" & gmt >
</CFIF>
<CFHEADER NAME="Pragma" VALUE="no-cache">
<CFHEADER NAME="Cache-Control" VALUE="no-cache, must-revalidate">
<CFHEADER NAME="Last-Modified" VALUE="#DateFormat(now(), 'ddd, dd mmm yyyy')#
#TimeFormat(now(), 'HH:mm:ss')# GMT#gmt#">
<CFHEADER NAME="Expires" VALUE="Mon, 26 Jul 1997 05:00:00 GMT">
</cfoutput>

I think that something is wrong with my code since this doesn't sem to be
working.

I'll see if I can get that to work. Does that look right to you?
AddThis Social Bookmark Button