Text Validation

Ok here is the skinny. I wanted to create a login form, something very simple. So I found a tutorial online http://www.5pieces.com/index.php/tutorials/comments/simple_login/.

I figured that I could alter it a bit to suit my needs. I created an input text field with a variable of “password” (no quotes of course) and a MovieClip for the submit button with an instance name of submit_btn. I put the following code in the 1st frame of the timeline:

submit_btn.onRelease = function() {
    if (password != "temp") {
        wp_txt._visible = true;
        trace("NOT WORKING");
    } else {
        trace("WORKING");
        rec_mc._visible = true;
        name_txt._visible = true;
        browse_butn._visible = true;
        upload_butn._visible = true;
        pass_label._visible = false;
        pass_txt._visible = false;
        submit_btn._visible = false;
    }
};

But for some reason no matter what text I use in the field after testing my movie it always traces back NOT WORKING. I have this problem a lot when I try to use an if statement to validate text.

Please help if you can.

Thanks in advance.