PDA

View Full Version : Flash login form and Coldfusion


lkrukowski
07-16-2004, 10:46 PM
Hello,

I have a Flash user login form which will post to a backend Cold Fusion program. If the login succeeds, It will redirect the user to client user page. If the login failes, the frame will jump the frame 65 and play a "access denied" movie then goto and stop on frame 61 ( where the login button is).

The problem is..., some time, even when the login has succeeded, the user doesn't redirect, instead, The whole flash movie reloads. The main movie is on level "0" and the movie that contains the form is loaded on level "2". In that case, user needs to login again. I'm not very familar with ActionScript, I don't know why it requires two times login.

Please anyone can help me figure it out. Thanks in advance.


The ActionScript is:

on (release, keyPress "<Enter>") {
// var status = "";
if (IssueUserName ne "" && IssuePassword ne "") {
loadVariablesNum("http://localhost/dvillusion/ClientLogin.cfm?Act=Login&IssueUserName="+IssueUserName+"&IssuePassword="+IssuePassword+"&time="+getTimer(), "0", "POST");
// if (status.indexOf("login_succeeded") != -1)
if (_level0.status eq "login_succeeded" || status.indexOf("login_succeeded") != -1) {
getURL("http://localhost/dvillusion/ClientFinal.cfm?Time="+getTimer());
} else {
gotoAndPlay(65);
}
}
}

There are two possible response from the backend Cold Fusion program:

&status=login_succeeded
&status=login_failed


There maybe some blank space contained in the output also.