This content has been marked as final. Show 9 replies
use an onChanged listener to check for "\r" in your textfield's text property and, if found, call your function.
txt.onChanged = function(str)
if(str.text.indexOf('\r') > 0) trace(str.text);
This don't work. It's not a multiline text field.
If I change the search string to only 'r' the input text is traced as it should when 'r' is typed in
can you please show an example?
what's the relationship between txt and str?
txt is the text field and the str is the string in the text field
enable the multiline property of txt (though you need not display more than one line) and use:
Isn't there a nother way to do the trick without adding the multiline property?
not that i know of. why?
there's no disadvantage to enabling the multiline property. you can always make it appear the textfield is singleline.
Im doing it your way.. Thanks for the help
Merry christmas :)
you're welcome. (and happy holidays to you, too!)