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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Password Protection 1

Status
Not open for further replies.

esyafini

Programmer
Oct 23, 2002
4
MY
What i'm having now is using the hidden file. The movie will prompt a password for user. Then, the software will check whether the file is there in the hard drive. Even they got the correct password but without the hidden file, then the access is banned. But i found out that this method is so simple... What i have in my mind is i want the script that creates liecense code, let say "FA". Then, when we install the software, we will be given a registration code, let say "101" which will be different each time we install. In that case, i hope that the liecense code will add on the registration code, means FA+101=FA101... Then, the user will be prompted to enter this FA101... then only the movie can be installed and played.

Help me i'm getting mad... or is there any other solution???? Hope "archerofloaf" can help me.....
 
Well, I would first set a few global variables for the registration code:

global gNum1
global gNum2
global gNum3
global gNum
global gPassword

on prepareMovie
set gNum1=random(9)
set gNum2=random(9)
set gNum3=random(9)
set gNum= gNum1&gNum2&gNum3
set gPassword= "FA"&gNum
end

so gNum will equal any three diffrerent combination, thats your reg. code.

You also see that the global variable gPassword will equal your license code + your reg. code.

To check the password have a framescript:


global gPassword
on mouseDown
if the text of member "passwordfield" contains gPassword then
X
end if
end

on enterframe
enterkey
end

on enterkey
if the keyDown=ENTER and the text of member "passwordfield" contains gPassword then
X
end if
end


X is whatever you want to happen upon the right password.

Hope this answers your questions, I was not sure whether there was more you wanted help if as it is unclear how much of this you have figured out.

Although the reg code is random I do not believe it is completely the way you might want it. Unless you could have a dir file install on the enduser's harddrive, I do not see a solution for a reg. code that is not the same twice.
 
u seem to know everything... yes, this is completely what i want.... i'll try it first.. thank you so much...
 
when i run the program, the script error pop up saying "property not found". Something is wrong at line "if the keyDown=ENTER and the text of member "passwordfield" contains gPassword then"..
and now m trying to debug it... do you have any idea why this thing could happen?
 
Sorry about the mix-up about that, get rid of those two handlers starting with on enterframe Put this keyDown handler instead inside your movie script.

on keyDown
if the key=RETURN AND the text of member ("passwordfield") then
go to frame 8
end if
end

You could also create a button that the enduser presses to check the password, for that put the mouseDown handler portion into a behavoir and onto the appropriate sprite.
 
Ignore all that stuff from the last post. Except for the part about the check password button, that is still good.

I noticed a problem with the handlers I suggested that you put in the movie script. Ignore those suggestions, I was a little hasty in posting that. It worked initially but I misled myself by not checking other things in my movie.

Instead put this into the frame script:

on enterFrame
if the key=RETURN AND the text of field ("passwordfield")=gPassword then
go to frame 8
end if
end

Now this worked as it should. If there any more problems feel free to ask.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top