Something like, haven’t test this (been awhile i use AS) but i think you get the meaning. Some AS-gurus will help you out i think
pwdArray = [“Trevor”, “Martin”,“Adrian”,“Ian”]; //here you can add pwds
on (release, keyPress “<Enter>”) {
for(i=0; i <= pwdArray.length; i++) {
if (password == pwdArray*) {
gotoandplay(2);
}//end if
}//end for
To combine the two use a variable that is set to “true” when password checks out, and then do the same thing for username. Then write another if statement to see if both new variables are true. If they are…gotoandplay(2). Good luck
Sounds good can you show me a sample of such a connection, as the username goes with the password for each login. If that makes sense. If you have chance please a sample of a typical script would be gr8
this is waht u want basically not to complicated for u to understand i suppose basics of as but for the best usabilty a server would be good asp or php
Thank you thats right what I wanted was the ‘and’ fucntion applied also, I will have a good look at this, Yes I really do need to get my head down and understand basics of the if statement etc, and other for that fact.
I started off with this
stop();
//General
user.type = "input";
pass.type = "input";
pass.password = true;
//Setting the fields blank at run time
user.text = ("");
pass.text = ("");
//Setting the focus for a field
Selection.setFocus(user);
This basically set my focus but also set the input boxes to default on retry, which is what I wanted
The for the button as, i added the following:
on (release, keyPress "<Enter>") {
if (password == "Trevor") {
gotoAndPlay(2);
} else if
(password == "Martin") {
gotoAndPlay(2);
} else if
(password == "Adrian") {
gotoAndPlay(2);
} else if
(password == "Ian") {
gotoAndPlay(2);
} else {
gotoAndStop(1);
briefText.text = ("Username and password incorrect, please try again.");
Selection.setFocus(user);
user.text = ("");
pass.text = ("");
}
}
So all I need to do is apply the and etc to get it working, yes I agree php, or in my case asp, would be better to apply it, but with this being internal would it be a problem, keeping it like this, as its not going to be made available to others online, but internal.
And I dont think people who work there are confident enough to do much harm if they wanted to
Thnx for the file, I will see if I can apply it as I am aiming to do.