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 Problem

Status
Not open for further replies.

nabbs

Programmer
Feb 21, 2001
18
GB
I am creating a cd rom and have set up a password facility for different areas, basically i have two passwords, each loading a different movie after being validated.

I was just wondering how I would go about doin this.

If you look at my script i have accomplished this by just having one password and it will go to the frame i want it to go to.

on enterframe

global gAccessRestriction

gAccessRestriction = [#bracknell["usa","promise"], #promise["promise"], #usa["usa"]]

end

on exitFrame me

go to the frame

end

property pField

property pSprite

property pValidChars

global gPassword

on beginSprite me

pSprite = sprite(me.spriteNum)

gPassword = ""

pField = pSprite.member.name

put "" into field pField

pValidChars = "0123456789abcdefghijklmnopqrstuvwxyz_"

end

on enterFrame me

keyPress = the keyPressed

if validate(me,keyPress) then

update me

end if

end

on validate me, theChar

case theChar of

BACKSPACE

if gPassword.length > 0 then

delete the last char of gPassword

end if

otherwise

if offset(theChar,pValidChars) then

gPassword = gPassword & theChar

return true

else

return false

end if

end case

end

on update me

tBullets = ""

repeat with x = 1 to gPassword.length

tBullets = tBullets & "*"

end repeat

put tBullets into field pField

end

global gAccessList, gAccessRestriction, gPassword

on mouseUp me

if gPassword = "" then

alert " Please enter Password OR contact Nabi to get the Password"

exit

end if

if validPassword(me, gPassword) then

gAccessList = gAccessRestriction[symbol(gPassword)]

put "" into field "Password"

gPassword = ""

go to movie "login.dcr"

else

alert "Password does not match, contact Nabi!!"

put "" into field "Password"

gPassword = ""

end if

end

on validPassword me, thePassword

definedPasswords = field("PredefinedPasswords")

repeat with x = 1 to definedPasswords.length

if thePassword = definedPasswords.word[x] then

return true

end if

end repeat

return false

end

on mouseWithin me

cursor 280

end

on mouseLeave me

cursor -1

end

how can I have 2 passwords and each of them load a different movie??

I hope some one can help!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top