Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

password problem

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
i trying to a make a password system, every user has his own .txt file where his password is stored,
this txt files are naimed after the username,
the user xyz would have his file xyz.txt where his password
123 is stored.
on the first frame in my film the user enters his username and password(pass)
and then presse the login button which does the following:

on (release) {
loadVariablesNum (+username+".txt", 0);
gotoAndPlay (2);
}


The second frame should verify the pass:

if password(from txt) eq pass(just enterd)
goto frame 3
else
stop



But ths doesnt work, i have no idea why, both pass and password are loaded correctly there is a problem in the if funktion. what should i do?

Thx


 
What's the exact code on frame 2?
Post it here as you've posted the one for frame 1.
mywink.gif
ldnewbie
 
second frame:

on (release) {
if (password eq pass) {
gotoAndPlay (3);
} else {
stop ();
}
}
 
"eq" seems to be a string operator!
Have you tried:
on (release) {
if (password == pass) {
gotoAndPlay (3);
} else {
stop ();
}
}
Also, there might be a problem with your variables. I gather password comes from the *.txt file and you're comparing it with the user's input in a text imput box, right?
mywink.gif
ldnewbie
 
man, i've tried everything ==, =, and eq,

i also think that the problem is in the variable loading, somehow flash cant do anything with variables loaded from a txt file.
I had the same problen when i tried to load a number from a txt and add 1 to it, flash loaded the number, but couldnt count it.
 
Yeah! Sort of remember that one! Didn't Dave (davdesign) or I help you solve that one? Did you ever get it down to working?
I have and old "reading a password from a text file" .fla lying around somewhere. I'll try and find it and see if it could help you.
Meanwhile, you could answer my last question in my previous post, register as a member, and maybe even send me the .fla you've got now at oldnewbie@hotmail.com
Pretty busy right now but will try to catch you later!
mywink.gif
ldnewbie
 
i managed the old one by using php and i think i found a way to do the pass thing, not like i wanted, but i works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top