PDA

View Full Version : solve cache code problem...



blah-de-blah
June 27th, 2003, 05:43 AM
myIdentifier=Math.round(Math.random()*10000);
loadMovie("myAnim.swf?uniq="+myIdentifier,1);

That is the code used to solve the cache problems, but i dont' really get the second line. How does changing the level or target of the new movie stop the old file from playing?!

i also searched what "?" does in flash, but i couldn't seem to find it. Could someone explain it to me, thx :)

pom
June 27th, 2003, 06:42 AM
We don't change the level, it's 1 all the time.

And "?" des nothing in Flash. It's just the way you pass variables in the query string. For instance, if you look at the URL of this page, it's something like showthread.php?s=&threadid=27002

And that code you posted, you're loading the page with a different identifier each time, that's all :)

blah-de-blah
June 27th, 2003, 06:46 AM
o...alrite i pretty much get that now, thx :)

blah-de-blah
June 27th, 2003, 06:49 AM
actually i'm stuck cause i don't know how to put that into my code...


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


is what i have, so how would i put that code into there?