Solve cache problem

http://www.kirupa.com/developer/actionscript/tricks/cache.asp

Using the tutorial above, i don’t know how to adjust the code to adapt to the way i load my movies. The code below is how i do it…

[AS]
_root.loader.loadMovie (_root.section +".swf")
[/AS]

but in the code in the link, it is:
[AS]
myIdentifier=Math.round(Math.random()*10000);
loadMovie(“myAnim.swf?uniq=”+myIdentifier,1);
[/AS]

So how would i adjust the second line of that to fit mine?? I tried substituting _root.section + “.swf” with “myAnim.swf…” but it doesn’t work. Any clues anyone? thanks!

myIdentifier=Math.round(Math.random()*10000);
_root.loader.loadMovie (_root.section+".swf?uniq="+myIdentifier)

ahh ok, how bout if there no loadMovie? what would it be? like i just have the code:

[AS]
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent200;
this.loadText = "Loading at " + Math.round(getPercent
100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}
[/AS]

at the begining of my Main movie. thanks btw :slight_smile:

you don’t need to use a unique identifier in that case

are y0u sure? because whenever i update the main movie, and upload it, it never seems to have updated :-\ Unless i delete all my cookies :angry: