all groups > flash actionscript > may 2006 >
You're in the

flash actionscript

group:

swf in browser cache - problem


swf in browser cache - problem makijaveli NO[at]SPAM gmail.com
5/30/2006 10:22:04 PM
flash actionscript:
hay,
I don=B4t knoe how to solve problem in browser not to cache flash (.swf)
files.
I am loading external.swf file to main.swf via button in main.swf. But
if I
change something in external.swf and upload this file on ftp, my
browser (FF,
IE) still uses "original" external.swf that was loaded previous time to
browser
cache and not "new" external.swf.
Does any one got solution to my problem
Please

Regards
Maki
Re: swf in browser cache - problem Bruce
5/31/2006 6:27:30 AM
Easy fix to this...

in your loadMovie command, add this to your code...

loadMovie ("ThisIsMySWF.swf" + "?" + random(100000), target, blah
blah);

the +"?" + random(100000) part is what does the trick - appends a
different "query string" to your URL every time, forcing the new
content from the server.


[quoted text, click to view]
Re: swf in browser cache - problem makijaveli NO[at]SPAM gmail.com
6/1/2006 12:33:58 AM

[quoted text, click to view]

tnx a lot.
tell me one more thing,
in my.html I put my.swf movie, that movie inside it self
have that code.
from that movie I call ThisIsMySWF.swf movie and inside This i have
a button that calls some ThirdMovie.swf.
If I change Third movie, will the others see that change.
Will it loads the old TirdMovie.swf or the new one?

tnx a lot

regards
Maki
Re: swf in browser cache - problem Bruce
6/1/2006 6:24:20 AM
If you will be updating the third movie content regularly, might want
to put the "?" + random(100000) tag to your loadMovie command in the
second movie as well. Just to make sure it loads the latest content.
Re: swf in browser cache - problem makijaveli NO[at]SPAM gmail.com
6/1/2006 11:34:24 PM

[quoted text, click to view]

thx,
tell me one more thing.
that code will look like this then

on (press) {
loadMovie("ThisIsMySWF.swf\" + \"?\" + random(100000)", "someMovie");
}
and why that question mark is in code.

regards
maki
AddThis Social Bookmark Button