-
User login problem
Hi,, I have a problem here,, I have a login and password box set in dynamic text and I want it to select (loadmovie) on password correct and to another (loadmovie) if the password is wrong. The problem is that I can't get the two text boxes to link with the (ok) "enter" button. Any AS or PHP,CGI scripts would be welcome. It's driving me nuts. I just can't get the thing to read both boxes and refer to the cgi for confirmation.
Cheers.
-
The main idea is to wait for the result generated by the PHP,CGI,etc script.
So ...
You have two dynamic text boxes (called for example "user" and "pasw") and that button.
The script for that button should look like:
this.loadVariables("kickuser.php?user="+user+"&pas w="+pasw+"&","POST");
The active script (PHP in this case) must be able to send the "pass" result.
In case of valid username and the password : echo "pass=YES";
Otherwise: echo "pass=NO";
Now inside of the SWF file:
For the keyframe containing the dynamic text boxes and that button, set this script:
pass = "";
check = 1;
onEnterFrame = function(){
if (check == 1){
if (pass == "NO"){check=0;holder.loadMovie("go home young fellow.swf");}
else if (pass == "YES"){check=0;holder.loadMovie("come to mamma.swf");}
}
}
stop();
Of course, you may improve many things there.
;)