flash actionscript:
Folks,
I have a simple username / password script.
Here it is:
---------------------------------------------------------------
on (press, keyPress "<Enter>") {
limitu = username.length;
limitp = password.length;
trace(limitu);
trace(limitp);
for (i=0; i<limitu; i++) {
trace(i);
if (usernameInput == username[i] && passwordInput == password[i]) {
// in message window, show access granted.
trace("granted.");
_root.message_window.gotoAndPlay("grant");
getURL(destiny[i], "_self");
trace(destiny[i]);
_root.user_txt.setFocus();
break;
} else {
// in message window, show access denied.
trace("denied.");
_root.user_txt.setFocus();
usernameInput = "";
passwordInput = "";
_root.message_window.gotoAndPlay("deny");
}
// end of if
}
// end of for
}
// end of on
-------------------------------------------
Here is the ActionScript code that is being loaded...
--------------------------------------
// ** MULTIPLE USERS, DESTINATION EDITION
// ******************************************************************
username = new Array();
password = new Array();
destiny = new Array();
// ** username 1 matches with password 1 ^_^
username[0] = "user1";
password[0] = "user1";
destiny[0] = "
http://audio.steeleimaging.com/CLIENT/destination.html"; //
username[1] = "user2";
password[1] = "user2";
destiny[1] = "
http://audio.steeleimaging.com/CLIENT/destination.html"; //
username[2] = "user3";
password[2] = "user3";
destiny[2] = "
http://audio.steeleimaging.com/CLIENT/destination.html"; //
username[3] = "user4";
password[3] = "user4";
destiny[3] = "
http://audio.steeleimaging.com/CLIENT/destination.html"; //
username[4] = "user5";
password[4] = "user5";
destiny[4] = "
http://audio.steeleimaging.com/KFGE/sicas.html"; //
username[5] = "user6";
password[5] = "user6";
destiny[5] = "
http://audio.steeleimaging.com/CLIENT/destination.html"; //
--------------------------------------------------------------------------------
---
When I test the movie, and trace the actionscript file, I can see that all of
the script information is loaded in. However, when I enter the credential
information, only USER1 is validated. Anything past USER1 wont work..
Help?