PDA

View Full Version : why can't I add new students to my FLASH 5 login screen?


Wfire3
09-02-2002, 11:11 PM
I'm just getting started in the FLASH scene and I'm currently using FLASH 5. I'm making an educational web site which requires me to make logins and passwords for each of my students.

I used the following code and was able to create the first 4 logins just fine. No problems at all! But now when I try to add a new student the same way, I get an error whenever the target URL tries to load.

I know I'm typing everything correctly and there's nothing wrong with the target URL.... is it because I'm using too many IF, ELSE statements together??? Is there a set number of IF, ELSE statements that can be combined together at 1 time? I've changed my code a few times to make sure that nothing's wrong with the logins, passwords and stuff.

The browser doesn't care as long as there's 5 logins total, but when I try to add a 6th, no matter what, the page won't load. The browser just says that it can't find the page. But it finds it perfectly after I delete the 6th entry.... Why is that?
Can you please help me?

Here's an example of the code that works....

//This is like the code i have on my sign in button
on (rollOver, rollOut){
wronglogin = ("");
}
on (release, keyPress "<Enter>") {
wronglogin = ("");

//STUDENTS

//administrator login
admin = ("Turkeyboy");
adpassword = ("gobblers");
administrator = admin+adpassword;
//akiko login
aki = ("Lala");
akipassword = ("Aki");
akiko = aki+akipassword;
//Takashi
st3login= ("Deadpool");
st3pass = ("187");
st3 = st3login+st3pass;
//Mamoru
st4login= ("mamopin");
st4pass = ("0555");
st4 = st4login+st4pass;
//Jinno (cousin)
yori = ("YouLoveIt");
yoripass = ("lovelyG");
yoriko = yori+yoripass;


//LOGIN AND PASSWORDS CODE
if (administrator == login+password) {
wronglogin = ("Hello!");
getURL ("http://www.angelfire.com/index.html", _self, "GET");
}else if (akiko ==login+password){
wronglogin = ("Welcome!");
getURL ("http://www.angelfire.com/index.html", _self, "GET");
}else if (st3 == login+password){
wronglogin = ("Welcome Takashi!");
getURL ("http://www.angelfire.com/index.html, _self, "GET");
}else if (st4 == login+password){
wronglogin = ("Welcome Mamoru!");
getURL ("http://www.angelfire.com/index.html, _self, "GET");
}else if (yoriko == login+password){
wronglogin = ("Welcome Yoriko!");
getURL ("http://www.angelfire.com/index.html", _self, "GET");



//final else statement... add other logins and ppasswords above.
}else{
wronglogin = ("Sorry, Please Try Again.....");
}
}


Everything works fine up to this point.... but when I try to add another student the same way. the browser says that it can't load the page. I've tried everything I can think of. Please help!!!!

Rupert
09-02-2002, 11:30 PM
Please just post to one forum. It makes it really hard to keep track of replies.

Wfire3
09-02-2002, 11:36 PM
sorry... thought they were different areas that weren't connected. Will keep that in mind!:D