well, after hours of work, i realized how it could work (i had the problem of not updating the messages, caused by loading them directly from the text-doc and not from the php-script). I now know how to load the variables from a php-script, but the flash-movie still shows the old messages.
It is a query string variable. You don’t need it in your PHP script.
It basically just confuses your browser into thinking that the file loading is a completely different file than before because it chooses a random number to tack onto the end of that query string.
This makes your browser cache that file and next time it loads it thinks it is a different file and will not load the cached version, but instead will show the new version.
I actually have to disagree about the way used in the trick, when your using Math.Random and Math.Round, there is a 1% possiblity or even more to get the same number again. However, as time always goes forward, i recommend going with this way:
I actually have to disagree about the way used in the trick, when your using Math.Random and Math.Round, there is a 1% possiblity or even more to get the same number again. **
True for a shoutbox. It wouldn’t be good to get the same number, but for just a standard site I don’t think that would be a problem. Given people would usually clean their temp files before the chance of getting the same number if you ask me.
thanks h88, it works now, but i now use 2 similar scripts, so the movie cant save the variables when they are loaded from a different script then before…
the only problem is that i “reload” the swf. now i do not know, if i load the swf with LoadMovie, is that possible?
its something like that:
when the user presses “post”, the swf sends the variables to the php-script. then theres a “GetURL”, which points to the swf itself. could that cause problems?.
Didn’t you get the open source files from me in the first place? Why would I copy your design? lol I’ll take a look at it. I’ll let you know what i find.
Don’t do the getURL to reload the SWF. That is not necessary. You only need to load the varaibles. Reloading the SWF is the same as pointing it to the first frame. And try using LoadVars instead of loadVariableNum…If you need my file again its here: