PDA

View Full Version : refreshing the dynamic text field



Dianachka
September 1st, 2002, 05:28 PM
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

Ryall
September 1st, 2002, 06:00 PM
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

iceman
September 1st, 2002, 07:01 PM
Try this code:

Attach this code to your refresh button.

on(release){
myTextField.text = "";
}

Hope this helps

Kyle

Ryall
September 1st, 2002, 07:21 PM
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

Dianachka
September 1st, 2002, 09:11 PM
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

imagebear
September 1st, 2002, 09:42 PM
In fact I don't know its usage,I hoped it can be discussed

<hr>updateAfterEvent();<hr>

Dianachka
September 1st, 2002, 10:32 PM
updateAfterEvent();

trying...

thanks, will let you know how it went :)

Diana

iceman
September 1st, 2002, 10:42 PM
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

lostinbeta
September 1st, 2002, 10:47 PM
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)

Dianachka
September 1st, 2002, 11:21 PM
trying all the tips you are giving me, will let you know which ones does the trick.

again thanks,

Diana

Bezzer
September 2nd, 2002, 03:43 AM
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 :)