a3mg
1
I wanted to know if anyone has found a method to limit the number of characters using the native.newTextField
Perhaps for a high score where only a certain number of characters can be displayed.
native.newTextField( 20, 60, 280, 30, fieldHandler ) [import]uid: 7845 topic_id: 5050 reply_id: 305050[/import]
tetu
2
to limit the number of characters to 10, in the “began” phase of the text field handler add an enterFrame listener that contains
input.text=string.sub(input.text,1,10)
in the “submitted” phase, remove the listener
there’s an “userInput” event.name, but i haven’t seen an example with that
[import]uid: 6459 topic_id: 5050 reply_id: 17255[/import]