Refreshing the dynamic text field

Here is the problem:

when i update the text files and press refresh on my website, the old text shows up in the dynamic text field, i have to actually close the browser and open the site again to see the new text, is there a way to have the text refresh using the refresh button?

thanks so much,

Diana

I am not 100% sure on this, but I dont think the text refreshes with the button because only the swf refreshes all other files are still be referenced through cache… I encounter the same thing in my sites - I just close the site and reload it to check it. It isnt really a problem though because anyone who loads the site after your update will get the new text.

Peace

Try this code:

Attach this code to your refresh button.

on(release){
myTextField.text = “”;
}

Hope this helps

Kyle

I may be wrong, but I believe she was talking about using the BROWSER refresh button - which I dont think there is a work around for. However using icemans code and making a refrash button in your swf would be a great idea - I didnt think of that.

Peace

yea a refresh button is cool, but i was wondering if this can be automatic and insinc with the refresh button itself…hmm still pondering on the idea,

but thanks for all the suggestions

Diana

In fact I don’t know its usage,I hoped it can be discussed

<hr>updateAfterEvent();<hr>

updateAfterEvent();

trying…

thanks, will let you know how it went :slight_smile:

Diana

onClipEvent(load){
myTextField.text = “”;
updateAfterEvent();

This will refresh that field every time you load the movie, if you put a blank movie clip on the first frame and attach this code.

Hope this helps

Kyle

Try this…

rn = Math.round(Math.random()*1000000);
loadVariablesNum (“flashdata.txt?reload=”+rn,0);

(that is, if you are loading your data from an external .txt file)

trying all the tips you are giving me, will let you know which ones does the trick.

again thanks,

Diana

IE’s cache can be really anoying sometimes…i usualy clear my temp files if i want to see it properly

try hitting F5 on the keyboard or ctrl F5 to refresh but i dont think it will be any different… also i think that the fact that the text loaded from a loadVars action being cached could bring out some major security issues… but yeah i’m going to go hide in my hole now :slight_smile: