PDA

View Full Version : solve cache problem...



blah-de-blah
July 20th, 2003, 03:22 AM
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...


_root.loader.loadMovie (_root.section +".swf")


but in the code in the link, it is:

myIdentifier=Math.round(Math.random()*10000);
loadMovie("myAnim.swf?uniq="+myIdentifier,1);


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!

ahmed
July 20th, 2003, 03:33 AM
myIdentifier=Math.round(Math.random()*10000);
_root.loader.loadMovie (_root.section+".swf?uniq="+myIdentifier)

blah-de-blah
July 20th, 2003, 04:00 AM
ahh ok, how bout if there no loadMovie? what would it be? like i just have the code:


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


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

ahmed
July 20th, 2003, 04:33 AM
you don't need to use a unique identifier in that case

blah-de-blah
July 20th, 2003, 08:04 AM
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: