Create Flash Login System using ActionScript
by Hiroshi on October 26th, 2008
If you want some hidden part or admin section in your flash movie then you can just create a login system for Flash using ActionScript.
Simple Flash File Login
Method 1 – Two Users
Take input fields user and pass. Create other two sections of login successful and login failed also. Create a Button and write following actionscript over it.

on (release, keyPress "<Enter>") { if ((user=="javed" && pass=="letmein") || (user=="admin" && pass=="go")) { gotoAndStop(10); } else { gotoAndStop(5); } }
This is simple condition example in flash actionscript. If provided login name and password will match with what are in the actionscript, the script will show success page, otherwise will return after showing login failed message.
Method 2 – Single User, Different Actionscript
Create input fields user and pass. Create other two sections of login successful and login failed also. Take a Button and write actionscript over it.
on (release, keyPress "<Enter>") { if (user eq"user" and pass eq"pass") { gotoAndStop(2); } else { gotoAndStop(3); } }
Related Posts
advertisements

where im type that script in flash frame
@alfian: You have to select button and open actions panel and write script there. Not at frame in timeline but at button. Please download example and see this method in action.