batmans_friend
03-17-2009, 11:08 PM
I'm making a flash login and I have the form all working, it passes on to PHP fine which processes it fine, I've checked that, but I can't get flash to take the output back.. I wonder if anyone could help? Here's the code (I based most of it on a tutorial):
stop();
//=================================
// INIT
//=================================
path = "php/"; //declare path to php files
lvOut = new LoadVars(); //create lv object
lvIn = new LoadVars(); //create lv object
lvIn.onLoad = function (success) {
if(success){
//PHP variable value to textbox
output.text = lvIn.returnVal;
}else{
//...or notify of failure
output.text = "fail";
}
}
//=================================
// BTN
//=================================
myBtn.onRelease = function(){
lvOut.username = username.text;
lvOut.pword = pword.text;
//send to a blank window...
//lvOut.send(path + "loginaction.php","_blank");
//get results returned to lvIn
lvOut.sendAndLoad(path + "loginaction.php", lvIn, "POST");
};
Thanks a lot :D
stop();
//=================================
// INIT
//=================================
path = "php/"; //declare path to php files
lvOut = new LoadVars(); //create lv object
lvIn = new LoadVars(); //create lv object
lvIn.onLoad = function (success) {
if(success){
//PHP variable value to textbox
output.text = lvIn.returnVal;
}else{
//...or notify of failure
output.text = "fail";
}
}
//=================================
// BTN
//=================================
myBtn.onRelease = function(){
lvOut.username = username.text;
lvOut.pword = pword.text;
//send to a blank window...
//lvOut.send(path + "loginaction.php","_blank");
//get results returned to lvIn
lvOut.sendAndLoad(path + "loginaction.php", lvIn, "POST");
};
Thanks a lot :D