Multiple User Name & Password

HomeTutorialsForumWebwasp MembersTemplatesMatesFoodContact

 


Flash Tutorials

   

Flash Tutorial - User Name and Password

 

Free Flash Tutorial


Step 4    <<   Previous      Intro   1   2   3   4    >>       >>   Webwasp Mates

 

Step Four: Optional Settings for Multiple User Names and Passwords

Most people will want to have more than one user! The above ActionScript is only good for a single user. If you have a small number of users you can add the ActionScript below. It is easy to add the script but there is one snag. The User Name is not linked to any particular Password. In other words I could use my User Name and any of the listed passwords not just my own. But both the User Name and the Password have to be typed exactly as listed in the ActionScript. Now if you only have a few users that is probably not a problem and there is no way that the Users would ever know that there is a security vulnerability. In the next tutorial I will show you how to match individual User Names with their own unique Password. I have not done so here because it is complicated and for many people the solution below is secure enough.

  1. To add more possible passwords:

    Look for the this line of ActionScript (as detailed in Step three, point 2  above) where it says:

    } else if (_root.Password == "wasp") {


    Edit the above line to look like this:

    } else if (_root.Password == "wasp" | _root.Password == "MyOtherPassword" | _root.Password == "MyFinalPassword" ) {

    You can change the word between the "quotes" as required and to add more possible passwords just keep adding a, line between the open and close brackets like this:

    | _root.Password == "WhatEver"
  2. Note: The vertical line: | used in script above stands for or. Knowing this makes it easier to read: This password or this password or this password etc.

  3. To add more User Names:

    Look for the this line of ActionScript (as detailed in Step three, point 5 above) where t says:

    } else if (_root.UserName == "web") {


    Edit the above line to look like this:

    } else if (_root.UserName == "web" | _root.UserName == "bob" | _root.UserName == "cat") {

    As before, change the word in the "quotes" and add as many User Names as you need.


Important Warning!

It is possible for people to hack Flash files and get access to the passwords and usernames. Never rely on a Flash Movie to protect really important or valuable information, as its not secure enough. The best protection against hacking is in the Publish Settings. To make your Movie much more secure, go to the Publish Settings and select:

To access the Publish setting open your Flash file and go to: File > Publish Settings > Select Flash > Flash Tab


Cross Ref: If you would like to add some additional features to your User Name/Password controls see the next Tutorial: User Name and Password - Advanced

 

Please indicate what you thought of this tutorial 
10 is the best: 
10 9 8 7 6 5 4 3 2 1

         

Step 4    <<   Previous      Intro   1   2   3   4    >>       >>   Webwasp Mates


Webwasp Community: Webwasp Mates & Dates

Why not try out webwasp's new community. Meet new people, find friends in your area: Webwasp Mates & Dates

Phil Schulz's Facebook profile
Webwasp is Phil Schulz's baby. You are welcome to contact me or become my Facebook friend: Click here

 Top of Page Home Food Mates Members Tutorials Forum Buy Templates Contact Us 
 All material on this site is protected under international copyright © law. DO NOT reproduce any material from this site without written permission. Please ask as permission is often granted.