Hiya, I’m going thru a Macromedia tutorial where a Flash app communicates with an ASP page to login to a website. For some reason Flash won’t open the ASP page, I get the error message 'Error opening URL “http://www.somedomain.flash/UserLogin.asp”
The actoinscript I am using is from the Macromedia tutorial and the completed file won’t work either. Here’s the Actionscript:
var loginURL:String = "http://www.somedomain/flash/UserLogin.asp";
var objToReceive:XML;
submit_btn.onRelease = function() {
var xmlToSend:String = "<Login><UserName>" + username_ti.text + "</UserName><Password>" + password_ti.text + "</Password></Login>";
var objToSend:XML = new XML(xmlToSend);
objToReceive = new XML();
objToReceive.onLoad = loginResponse;
objToSend.sendAndLoad(loginURL, objToReceive);
_root.gotoAndStop("Waiting");
};
function loginResponse() {
var response:String = objToReceive.firstChild.firstChild.firstChild.nodeValue;
if (response == "Login Correct") {
_root.gotoAndStop("Login Success");
} else if (response == "Login Incorrect") {
_root.gotoAndStop("Login Failed");
}
}
The ASP file displays fine in my browser and my server is ASP enabled. I am probably missing something obvious here as I am new to server-side stuff.
Anyone got any ideas what the problem is?
Thanks for your help,
Hectors