I have a button that loads guestbook.swf. As guestbook would be updated by me I would like the latest non cached version of guestbook.swf to load always.
This is the current working code on the button-
on (release) {
//load Movie Behavior
if(this.L == Number(this.frame)){
loadMovieNum("guestbook.swf",this.frame);
} else {
this.frame.loadMovie("guestbook.swf");
}
//End Behavior
}
I would like to do what this guy suggested-
[QUOTE=lewi-p;2581359]Using a random variable will work but it’s not exactly efficient. If you generate a random number everytime someone requests your SWF, your server will be sending a brand new version every single time…your bandwidth could potentially go through the roof!
I would suggest using a date & time based cache buster string…so adding [COLOR=#ff0000]“movingly.swf?cache=20101028” (todays date).[/COLOR]** [COLOR=#ff0000]So in this case everyone will get the same file that day.[/COLOR]**
lewi-p[/QUOTE]
I added his code like this to the button-
on (release) {
//load Movie Behavior
if(this.L == Number(this.frame)){
loadMovieNum("guestbook.swf**?cache=20101028" (todays date)**",this.frame);
} else {
this.frame.loadMovie("guestbook.swf**?cache=20101028" (todays date)**");
}
//End Behavior
}
Well the button stopped working when I added that. How should the code look for it to work? Thanks :+)