Don't understand the tut for solving cache problems

Where is that code supposed to go?

I am refering to the tut for solving cache problems located in the Actionscripting>Basic section

I am using Flash MX

Thanks.

I am assuming that you are reading the one in the AS Tricks section considering there is no Basic section under Actionscipt.

It is the tutorial that give you this code…

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

That code goes on a frame.

The myIdentifier part gives your file a random number to load with, and the loadMovie part is what you load your movie with. This doesn’t stop the cache of your MAIN flash page, but the subcontent that you load dynamically using loadMovie (or loadVariables, or loadVariablesNum, or loadMovieNum).

The loadMovie part loads in your movie, and adds a unique indentifier number to it so that everytime your browser loads it it will be a different number and so your browser will treat it as a new file and not the same one it has cached already.

I see. Is there anyway for this to work for the main movie then?

Well if you use loadMovie for each ofyour sections (which I highly recommend), you don’t need to do this for your main movie.

The only way I can think of is if you loaded your main movie in with loadMovie.

I believe there is a PHP way for the main page, but I don’t know how to do that.