View Full Version : Multiple Passwords
WandMan
June 14th, 2005, 12:34 PM
I am working on a client log-in page, and I would like to have multiple passwords instead of one. This is the code I am using:
password = inputName
if (password == "kirupa") {
inputStatus = "Access granted!" ;
} else {
inputStatus = "Access denied!" ;
}
I have tried making two action frames and on this: if (password == "kirupa"){ I just did this: if (password == "kirupa""WandMan""Lizrds""Foz"){
Help!!!
Thy
June 14th, 2005, 01:39 PM
Hi WandMan
you must use the "OR" operator for short we can use "||"
try this:
password = inputName
if (password == "kirupa" || password == "WandMan"|| password == "Lizrds"|| password =="Foz") {
inputStatus = "Access granted!" ;
} else {
inputStatus = "Access denied!" ;
}
Hope it helps :)
WandMan
June 14th, 2005, 01:43 PM
Thank you so much!!!
WandMan
June 14th, 2005, 01:47 PM
can you also have the gotoAndPlay after each one? If so How?
I wand it to go to a page for just that client and have their name on it and their stuff.
MTsoul
June 14th, 2005, 02:15 PM
password = inputName
if (password == "kirupa") {
inputStatus = "Access granted!";
gotoAndPlay(3);
} else if (password == "WandMan") {
inputStatus = "Access granted!";
gotoAndPlay(4);
} else if (password == "Lizrds") {
inputStatus = "Access granted!";
gotoAndPlay(5);
} else if (password == "Foz") {
inputStatus = "Access granted!";
gotoAndPlay(6);
} else {
inputStatus = "Access denied!" ;
}
WandMan
June 14th, 2005, 02:18 PM
Thanks to all!!!!
WandMan
June 14th, 2005, 02:36 PM
For some reason, the "Access Denied" part isn't showing up?
Uli
June 14th, 2005, 04:16 PM
just cause i'm bored...
passes = ["heh" , "w00t", "l4me"]
for(i = 0; i<passes.length;i++){
if(password == passes[i]){
inputStatus = "access granted"
return i;
}}
WandMan
June 14th, 2005, 10:40 PM
Sorry. I am done and firgured it out. Thanks though.
Thanks to all!!!
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.