RE: [Flashcoders] Textfield clearing on Enter key

2006-07-04 Thread Danny Kodicek
God knows why this is such a hassle: I have a chat app that sends messages when the user hits enter. The input field is multiline (and needs to be, for the sake of elegance). Hitting enter inserts a line break in the text regardless of what i do right now. The method reads something like

Re: [Flashcoders] Textfield clearing on Enter key

2006-07-04 Thread janosch
Hello, the text length is 0, becaus at this time, there is no linebrake in the textfield. The Key-Listener is faster than the textfield. Try this: _root.createTextField(txt, 1, 0, 0, 100, 100); _root.txt.type = input; _root.txt.multiline = true; _root.txt.wordWrap = true; _root.clearText =