I am trying to capture some user input and submit it to a database. I can do it successfully providing I use the second argument i.e. (_parent, _self etc).
I don't want my users to suddenly be transported from the middle of a Flash movie to a _blank page etc just because they submit their information.
How do I get the information to submit to the database without interupting the user experience?
I have posted my code below:
As I mentioned earlier, this code works fine providing I use the second argument although according to the documentation I should be able to leave this argument blank. I've seen loads of Flash sites give you the option of submitting info without loading the page.
Any Ideas?
Thanks in advance,
Chris
I don't want my users to suddenly be transported from the middle of a Flash movie to a _blank page etc just because they submit their information.
How do I get the information to submit to the database without interupting the user experience?
I have posted my code below:
Code:
onClipEvent(load){
sendScores = function(userName, userEmail, userScore){
myVars = new LoadVars();
myVars.uname = userName;
myVars.email = userEmail;
myVars.score = userScore;
myVars.send("submitinfo.asp");
}
}
onClipEvent(mouseUp){
if (this.hitTest(_root._xmouse, _root._ymouse)){
userName = _root.uname.text;
userEmail = _root.email.text;
userScore = _root.score.text;
sendScores(userName, userEmail, userScore);
}
}
As I mentioned earlier, this code works fine providing I use the second argument although according to the documentation I should be able to leave this argument blank. I've seen loads of Flash sites give you the option of submitting info without loading the page.
Any Ideas?
Thanks in advance,
Chris