×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Password Problem

Password Problem

Password Problem

(OP)
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!!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close