Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Supporting Technologies > Server-Side Scripting

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-28-2001, 03:18 PM   #1
boldlittletiger
Registered User
 
Join Date: Mar 2001
Location: Manchester
Posts: 5
Question

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..
boldlittletiger is offline   Reply With Quote
Old 03-29-2001, 01:22 AM   #2
Jesse
Administrator
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: Australia
Posts: 8,612
Default

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.
Jesse is offline   Reply With Quote
Old 04-02-2001, 10:29 PM   #3
boldlittletiger
Registered User
 
Join Date: Mar 2001
Location: Manchester
Posts: 5
Talking nice one

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/
boldlittletiger is offline   Reply With Quote
Old 04-03-2001, 12:00 PM   #4
MartinThorpe
Registered User
 
Join Date: Apr 2001
Posts: 4
Default In flash 4

Will this work in Flash 4?
MartinThorpe is offline   Reply With Quote
Old 04-03-2001, 12:10 PM   #5
Jesse
Administrator
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: Australia
Posts: 8,612
Default

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.
Jesse is offline   Reply With Quote
Old 04-03-2001, 12:21 PM   #6
MartinThorpe
Registered User
 
Join Date: Apr 2001
Posts: 4
Default works

Thanks very much for that... it works fine.. brilliant cheers

Martin
MartinThorpe is offline   Reply With Quote
Old 04-05-2001, 09:54 AM   #7
boldlittletiger
Registered User
 
Join Date: Mar 2001
Location: Manchester
Posts: 5
Default da man

da man..
boldlittletiger is offline   Reply With Quote
Old 04-27-2001, 12:40 PM   #8
Sjuul
Registered User
 
Join Date: Apr 2001
Posts: 3
Default

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.
Sjuul is offline   Reply With Quote
Old 04-27-2001, 12:44 PM   #9
MartinThorpe
Registered User
 
Join Date: Apr 2001
Posts: 4
Default

I am working in Coldfusion... there is a similar command in CF to do this, but it does not affect the swf.
MartinThorpe is offline   Reply With Quote
Old 04-27-2001, 02:04 PM   #10
Sjuul
Registered User
 
Join Date: Apr 2001
Posts: 3
Default

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
Sjuul is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

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


All times are GMT. The time now is 09:20 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.