Skip to main content
November 6, 2008
Question

Input Text Box Listener

  • November 6, 2008
  • 2 replies
  • 260 views
Hello, is there a way to be able to tell if someone has written in a text box or not? I am trying to make a compiled list that is dependent on what the user interacted on in different sections. If I can reference the text box and its contents being either full or empty, I might be able to so something.
Is this possible?

Thanks Dan,
This topic has been closed for replies.

2 replies

Ned Murphy
Legend
November 7, 2008
Another option is to check the length of the text in the TextField, as in...

if (inputTXT.length != 0)....
Participant
November 6, 2008
I created an imput box with the instance name "inputTXT".

Then I created this looping function

this.onEnterFrame = function() {
if (inputTXT.text != "") {
trace("written");
}
};

line 1: starts a function that simply loops forever.
line2: checks to see if the inputTXT box has any text in it.
line3: If there is text in the field, "written" will continuously trace.

Hope this helps