Groups | Blog | Home
all groups > flash actionscript > august 2004 >

flash actionscript : loadVariables only works one time


dot365
8/3/2004 10:23:17 PM
Hi,

I have a problem with loadVariables in my Flash movie. I have an aspx page
that inserts data into a database. I use loadVariables to post data to that
page. The script works fine. The problem is that loadVariables doesn't seem
to work if I call it a second time.

It works the first time and data is inserted into my database, but when I call
it again later with the exact same call it does not work. It seems to only
work one time per movie...

Any ideas or help would be appreciated.

Thanks
nITiNkIlLeRmEeRuT
8/4/2004 5:28:42 AM
r u using the relative path or absolute path in a call to ur aspx page.
place57 NO[at]SPAM hotmail.com
8/4/2004 6:01:37 AM
[quoted text, click to view]

Add something that is different each time (say a datetime on the URL)
dot365
8/5/2004 9:33:51 PM
Thanks for the suggestions. I have tried both but the do not seem to work.

The call to the aspx still only works 1 time. What I'm trying to do is log
certain actions in my flash movie. For example when a user logs in I'd call a
function to insert a log into my database. The same when a user clicks on
certain parts of the movie. I'd call the same function to log that the user
performed certain actions while viewing the movie.

The log in works, but any call after that does not work. If I remove the log
in call then the first action the user performs is logged correctly , but any
additional actions do not get logged...


claire_thomson NO[at]SPAM hotmail.com
8/6/2004 7:49:33 AM
I seem to be having the same problem.

I have a flash movie in which the user can enter a search phrase.
The flash movie sends this information to and aspx page by this method
:

<CODE>
on(release)
{
_root.loadVariables("default.aspx?question="+question.text,"POST");
question.text = "" ;
}
</CODE>

the aspx page then runs a query on a database and returns a result via
:

<CODE>
try
{
SqlDataReader myReader = dbCommand.ExecuteReader();

if (myReader.Read())
{
myURL = "response="+myReader.GetString(0)+"&ignore=";
Response.Write(myURL);
}
else
{
Response.Write("response=No Information Found&ignore=");
}
}
catch
{
Response.Write("response=SELECT Error!&ignore=");
}
</CODE>

This works perfectly the first time a user asks a question but, no
matter what is asked the next time I get no response!!!

I know my aspx works fine as I've tested it fully. Flash just doesn't
seem to read the next reply from it!!!

mitja0
9/3/2005 7:40:30 PM
Here is problem that the data was pulled from the cache!!! IE :( in FIREFOX
works OK!

Here is solution for this problem:
loadVariables("http://whatever/time.pl?Var=" add getTimer(),"");

The var must be different and it will work.
AddThis Social Bookmark Button