In this tutorial you're going to learn how to create a password varification system in flash.

Password is: flash

Important notice: This method of password varification does not provided high level of security. Since the verification is client-side, finding out the stored password in the .swf file is not impossible. Therefore, it is strongly advised not to use this method when it comes to very important and sensetive issues. A server-side verification method is the answer in that case.

1:

Ok, the first step is to prepare the interface and distribute the required objects and movie clips on the layers.

image01
Fig 1

The correct/wrong layer will hold our 3 verification results.

The 3 Verification Results:

  1. The Password is correct.
  2. The Input Field is Blank, please enter your password.
  3. The password is wrong!

Those are the three main conditions, place each on a different keyframe. In our case, the 4th, 5th and 6th keyframes represent the correct, blank and wrong conditions respectively.

2:

After completing and placing all the required elements on the stage, we are going now to set a few properties for the input field.

image02
Fig 2

3:

Well done. In this step we are going to set the actions.

image03
Fig 3
  • Select the first keyframe of the "submit" layerand add a "stop" action to it.
  • Select the submit button and add an OnRelease Goto action to frame 3. This is the frame in which the action responsible for all the password verification is.
  • Add a stop action to each of the "Correct/wrong" keyframes.

4:

In this step, the last one, we are going to add the main action script. It is a simple script and should be easy to follow.

image04
Fig 3

Select the 3rd frame of the "Password verification" layer and add the script shown in Fig 4.


Description:

Conclusion:

What we did:


Thank you, hope you enjoyed this tutorial and did not face any troubles :)

Download *.fla

Author: Aevision