# Simple AS2 Login

**URL:** <https://forum.kirupa.com/t/simple-as2-login/310592>\
**Category:** flash\
**Created:** [June 14, 2010, 2:55pm UTC](https://forum.kirupa.com/t/simple-as2-login/310592 "2010-06-14T14:55:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![damonlee3](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@damonlee3](https://forum.kirupa.com/u/damonlee3)\
**Post date:** [June 14, 2010, 2:55pm UTC](https://forum.kirupa.com/t/simple-as2-login/310592/1 "2010-06-14T14:55:11Z")

</div>

Hello,

I’m trying to create a simple login for a flash site written in AS2.

This should be extremely simple. I don’t want to use PHP and MySQL, that would be overkill.

On the home page of the site, I want a login box to appear, then once the correct user name and password is entered, I want to gotoAndPlay(whatever)

I have three text boxes setup with following instance names assigned:  
username (input text)  
password (input text)  
msg(dynamic text)

Here is my code that is placed directly on the submit button:

Code:

```auto
on (release, keyPress "<Enter>")
 
 {
 if (username == "" or username == "") {
  msg = "Invalid username!";
 }
 if (password == "" or password == "") {
  msg = "Invalid password!";
 }
 if (username == "me" & password == "mine" 
or username == "guest" & password == "guest") {
  msg = "Welcome "+username;
  gotoAndPlay(139);
 }
}

```

When I run the .fla, nothing happens. Any ideas?

any ideas??

-Damon
