Skip to main content
Inspiring
August 21, 2007
Answered

loadVariables onEnterFrame

  • August 21, 2007
  • 1 reply
  • 252 views
so i have a simple php script below that gets the time of the server hosting the script. my flash file has a simple loadVariables, loading the variables from the php script onEnterFrame. the problem is that the value of the variables is not getting refreshed. the output of the trace below just repeats the same value for CSTseconds over and over again. how do i get it to change to the refreshed/current value?

This topic has been closed for replies.
Correct answer Greg Dove
You're calling it every onEnterFrame? Is that necessary. It seems unusual to do that. I don't know if the response would be received before the next request was sent (and I don't know what might happen under those circumstances).

It may also be being cached.
You could try adding a random unique code to the test.php to try to avoid that.

e.g.
loadVariables("test.php?cachebuster="+getTimer(), "");

1 reply

Greg DoveCorrect answer
Inspiring
August 21, 2007
You're calling it every onEnterFrame? Is that necessary. It seems unusual to do that. I don't know if the response would be received before the next request was sent (and I don't know what might happen under those circumstances).

It may also be being cached.
You could try adding a random unique code to the test.php to try to avoid that.

e.g.
loadVariables("test.php?cachebuster="+getTimer(), "");
Inspiring
August 21, 2007
ok, the onEnterFrame was a bit excessive. while troubleshooting it and waiting for a response i removed that part. i still had the same problem though.

it was cached. your solution worked perfectly. thanks!

i had to respond to because i love your signature. i saw that about a year ago on a t-shirt and ever since then it has been on my to do list to make a shirt of my own. anyweezer, rock on.