Ok I have a flash intro and login in a index.html, ASP code in file called login2.asp and My SQL Server database.
I can't connect on a login.
ASP code in its own file:
<%@LANGUAGE="VBSCRIPT"%> <%
Dim myconnection__strUserID
myconnection__strUserID = "x"
if(Request.Form("UserID") <> "") then myconnection__strUserID = Request.Form("UserID")
Dim myconnection__strPassword
myconnection__strPassword = "1"
if(Request.Form("Password") <> "") then myconnection__strPassword = Request.Form("Password")
%> <%
set myconnection = Server.CreateObject("ADODB.Recordset")
myconnection.ActiveConnection ="dsn=k_FlashLogin;"
myconnection.Source = "SELECT * FROM Login WHERE UserID = '" + Replace(myconnection__strUserID, "'", "''") + "' AND Password = '" + Replace(myconnection__strPassword, "'", "''") + "'"
myconnection.CursorType = 0
myconnection.CursorLocation = 2
myconnection.LockType = 3
myconnection.Open
myconnection_numRows = 0
%>
<% If myconnection__strUserID <> "x" Then
If Not myconnection.EOF Then
Response.Write "login=Granted"
else
Response.Write "login=Denied"
End If
End If
%>
Flash button code:
on (release, keyPress "<Enter>") {
if (UserID eq "") {
output = "You Must Enter A Login ID";
output2 = "";
} else if (Password eq "") {
output = "You Must Enter A Password";
output2 = "";
} else {
loadVariablesNum("login2.asp", 0, "POST");
play();
}
}
Actions Line:
frame 1:
setProperty("", _focusrect, false);
UserID = "";
Password = "";
stop();
frame 2:
loadVariables("login2.asp", "", "POST");
frame 3:output = "Accessing Database";
output2 = "Please wait";
frame 19:
if (login ne "") {
if (Login eq "Granted") {
gotoAndPlay("Granted");
} else if (Login eq "Denied") {
gotoAndPlay("Denied");
}
}
frame 20:
output = "Access Denied";
output2 = "Try Again";
frame 40:
gotoAndPlay(1);
frame 41:
output = "Login Verified";
output2 = "Welcome";
UserID = "";
Password = "";
frame 45:
stop
Any help would great. I got this script at Flashkit.com and would love it to work. Thanks again.