PDA

View Full Version : PHP/loadVariables problem . . .


Qutaibah
07-27-2002, 11:30 AM
Hi guys,
I am having a strange problem with my loadVariable ActionScript. I don't respond from the fist time I click the button. I have to click the button twice or double up the "loadVariables" command like this.
-------------------------------------------------------------------------------------------------------------------
on(release){
******this.codeOut="";
******this.nameOut="";
******randNum = Math.random()*1000000000;
******loadVariables ("update.php?" add randNum, this, "POST");
******loadVariables ("update.php?" add randNum, this, "POST");
***
******
}
--------------------------------------------------------------------------------------------------------------------
does this sound familiar to anyone.
thanks
Qutaibah

Jesse
07-28-2002, 02:18 AM
Does the same thing happen if you use GET instead of POST? I've never had this problem before.

Qutaibah
07-28-2002, 03:19 AM
I tried both "POST" and "GET". it's very puzzling. i am not sure why it happen!!

some times I have triple them so get them to work
Qutaibah

Jesse
07-28-2002, 07:10 AM
How about making it:
loadVariables ("update.php?noCache" add randNum, this, "POST");

Qutaibah
07-28-2002, 08:30 AM
Hi Jesse,

thanks for your suggestions, but it didn't really work. you know what I'm thinking. I think I am going to start shifting to loadVars I seems like it's a more reliable way for loading variables.

Anyhow, thanks again
Qutaibah

shaba
08-02-2002, 08:01 PM
Typically there is a short delay between when you initiate the loadvariables command and to when you receive a reply from the server. when you issue the command a second time, it kind of flushes the cache and gives you a result from the first attempt.

This is something I noticed when i used the loadvariables function.

a way to fix it is to write a listener movieclip to make sure that it receives a reply before moving on. take a look at flashkit.com's tutorials on loadvariables. that should be a good start