Login input text defaults

i am trying to have a login text field that has default text in it which disappears when a user clicks in the text box. i’ve tried every solution on this forum and it seems to get the default text in the box but i can;t get it to disappear when curser clicks in box.

currently:

userText.text = “username”;
userText.onSetFocus = function(){
userText.text = “”;
}