# How to Create Login Page!

**URL:** <https://forum.kirupa.com/t/how-to-create-login-page/223001>\
**Category:** Uncategorized\
**Created:** [April 18, 2007, 5:28pm UTC](https://forum.kirupa.com/t/how-to-create-login-page/223001 "2007-04-18T17:28:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebele54](https://avatars.discourse-cdn.com/v4/letter/e/94ad74/32.png) [@ebele54](https://forum.kirupa.com/u/ebele54)\
**Post date:** [April 18, 2007, 5:28pm UTC](https://forum.kirupa.com/t/how-to-create-login-page/223001/1 "2007-04-18T17:28:43Z")

</div>

I NEED HELP… im trying to create an swf that will have a login page where one has to insert username and password… and it will work with multiple users using external txt files or any simplem alternative.

i saw this tutorial on the net but it keeps giving error messages… please do u have ideas how it can work or alternatives?

Dynamic Multiple Login Structure within External Txt File  
// Assume AAA is the username and BBB is the password.  
// Create AAA.txt in the same directory with the source file.  
// Write password=“BBB” in AAA.txt and save it.

// Create two textFields and name them as username and pswd.  
// Write the following code to the first frame:

username = “”;  
pswd = “”;  
stop ();

// Then, write the following to the second frame:

login = username +".txt";  
loadVariablesNum (login, 0);

// Create two scenes for the denied and accepted users.  
// Let’s say scene1 for the denied, scene2 for the accepted users.  
// Code for the third frame is:

if (pswd ne password) {  
gotoAndPlay (“scene1”, 1);  
} else if (pswd eq password) {  
gotoAndPlay (“scene2”, 1);  
}  
stop ();

// Code for the enter button (with a keyboard event) is:

on (release, keyPress “\<Enter\>”) {  
if (username add pswd eq “” add “”) {  
gotoAndStop (“scene2”, 1);  
} else {  
gotoAndPlay (“scene1”, 1);  
}  
}

// Now, you can test your swf with AAA as a username and BBB as  
// a password, since your swf and AAA.txt are in the same directory.  
// You can add more than one txt file, which means new usernames  
// with new passwords without touching the source file.
