Hi Guys!
I want to set up a login area für multiple users and passwords. I tried to do it with the array function, but I got into trouble when trying to compare the values of the array with the input field. The following is my code:
varUsername and varPasswort are the two text input fields. What am I doing wrong? Can you help me please?
Thanks a lot
I want to set up a login area für multiple users and passwords. I tried to do it with the array function, but I got into trouble when trying to compare the values of the array with the input field. The following is my code:
Code:
Daten_Eingabe = varUsername add varPasswort;
//
function Data (Name, Passwort) {
this.Name = Name;
this.Passwort = Passwort;
}
//
var Datensatz = new Array();
Datensatz[0] = new Data("Michael", "Test");
Datensatz[1] = new Data("User2", "Password2");
//
for (i=0; i<Datensatz.length; i++) {
if (Daten_Eingabe eq (Datensatz[i].Name add Datensatz[i].Passwort)) {
_root.gotoAndStop("ZF_VD");
} else {
gotoAndStop (2);
Selection.setFocus("_level0.varUsername");
loadVariables (ZF_Sorry, "mvZFComment");
varUsername = "";
varPasswort = "";
}
}
Thanks a lot