| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Mar 2001
Location: Manchester
Posts: 5
|
I've got a dynamic high scores page, which uses variables from a text file written with ASP. Problem is, when I go back to the game, get a new high score, and my high scores pop up, it shows the cached version of data in the swf file. I know this problem is caused by caching in my browser coz when I remove the file from my temp internet files it works a treat..
I've heard that you can use an FSCOMMAND to stop the swf file from cachin.. is this true? I can't find any literature on this at all.. Any ideas? ta very much.. |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2000
Location: Australia
Posts: 8,612
|
So your loading variable from a text file?
Your problem would be caching of the text file then, so make your code this (assuming your file is called 'datat.txt'): loadVariablesNum ("data.txt?noCache=" + Math.floor(random(1000000) / random(1000)), 0); Or soemthing similar. All this deos it generate a random number to appaned tot he variable call so that you don't call the same file twice. (Well you do actually call the same file veery time, but the URL is different so the browser wont cache it) Cheers Jesse
__________________
Cheers Jesse Stratford ActionScript.org Cofounder Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org Please don't email or PM me Flash questions, that's what the Forums are for! ![]() Please don't rely on me reading my PMs either. Email me about important stuff. |
|
|
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Mar 2001
Location: Manchester
Posts: 5
|
buzzin mate.. I should have realised!! pure guroooo!
I'll be round if it doesn't work!!! ![]() cheers very much! Justin http://www.boldlittletiger.com/ |
|
|
|
|
|
#4 |
|
Registered User
Join Date: Apr 2001
Posts: 4
|
Will this work in Flash 4?
|
|
|
|
|
|
#5 |
|
Administrator
Join Date: Nov 2000
Location: Australia
Posts: 8,612
|
yes but you have to use different code and Flash 4's random function isn't so great... something like:
"data.txt?noCache=" & ( random(10000) + random (123456) ) that should do you Cheers Jesse
__________________
Cheers Jesse Stratford ActionScript.org Cofounder Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org Please don't email or PM me Flash questions, that's what the Forums are for! ![]() Please don't rely on me reading my PMs either. Email me about important stuff. |
|
|
|
|
|
#6 |
|
Registered User
Join Date: Apr 2001
Posts: 4
|
Thanks very much for that... it works fine.. brilliant cheers
Martin |
|
|
|
|
|
#7 |
|
Registered User
Join Date: Mar 2001
Location: Manchester
Posts: 5
|
da man..
|
|
|
|
|
|
#8 |
|
Registered User
Join Date: Apr 2001
Posts: 3
|
What you should do is put
<% Option Explicit Response.Expires = 0 %> In the ASP file. This instructs the browsers not to cache the data. If people have viewed the page before you have added the lines to the ASP file, they will still get the cached copy. So it only works if you don't already have a cached copy. |
|
|
|
|
|
#9 |
|
Registered User
Join Date: Apr 2001
Posts: 4
|
I am working in Coldfusion... there is a similar command in CF to do this, but it does not affect the swf.
|
|
|
|
|
|
#10 |
|
Registered User
Join Date: Apr 2001
Posts: 3
|
Isn't that just what you want? I'd say you'd want to have the .swf cached, so it loads quickly, and have it load it's data from the asp/coldfusion/php/whatever page, since it's not the .swf that changes, just the data
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sound in seperate swf files | cris19 | Simple Stuff (Newbies) | 4 | 08-02-2005 08:50 PM |
| Flash movie loads swf files from other location? | Jane20 | ActionScript 1.0 (and below) | 8 | 07-25-2005 05:04 AM |
| how to loading swf files in sequence ? | lotostar | ActionScript 1.0 (and below) | 2 | 12-23-2004 06:29 AM |
| Protecting SWF files. | amin-dj | Other Flash General Questions | 14 | 02-11-2004 07:49 PM |
| opening ext. txt files in a swf movie opened within another swf movie | Jon B | ActionScript 1.0 (and below) | 5 | 09-14-2002 11:07 PM |