Onscreen keyboard w/ login

Hey there, this is my first post here, and I could really use some help/advice if anyone has time. I’ve done a few searches, but haven’t really found anything like this.

I’m trying to build an onscreen keyboard, with text fields for a user name and password. Ideally, after the name and password have been entered and either the user presses Enter on the keyboard or the Enter button onscreen, the user name and password would be sent to an external text file.

The first problem I have is simply pressing the letter and having the appropriate letter sent to the correct text field. Just as a test to see if I could get one text field working correctly, I put this on one of the letters:

on(release){
username.text = username.text + “a”;
}

username is, cleverly enough, the name of the user name text field, and
pass is the name of the password field. Now, that code works for one
text field…sometimes. I have it set up so that the Shift key goes to
frame 5, where the uppercase letters are. If I use that same code but
with an uppercase letter on the uppercase button, it doesn’t work. I
also have this code set up for the backspace key:

on(release){
username=username.substr(0, username.length-1);
}
And…it doesn’t work either.

I’m not sure how to attach my file to the post, so if anyone is interested the .fla can be downloaded here and the swf file (what there is of it) can be seen [url=“http://www.wombtotomb.com/flash/keyboard05.swf”]here.

Sorry for taking up so much of your time, I’d be ever so grateful if someone could help me!