This content has been marked as final. Show 3 replies
Well, what you could do, instead of having the script that you use to capture the key ignore it, have it insert a RETURN in the text field. So...
myField.member.text = myField.member.text &RETURN
Not sure if that is what you're looking for.
Thanks for responding ...
I tried that, thinking it would be a simple solution, but it doesn't put in the line return ... it doesn't seem to do anything though from all appearance.
This code seems to work...
if the keyCode = 76 then
sprite(spriteNum).member.text = sprite(spriteNum).member.text & RETURN
Or, I may have realized another issue... If you are using a field instead of a text box, this will not totally work. You will also have to place the cursor on the next line as well. I bet if you try to move the cursor down manually after you press the enter key, you'll see it move down. But, when you just press it, it only adds the carriage return, but doesn't move the mouse to the end of the field. You'll have to add something like...
myTextCount = sprite(spriteNum).member.text.char.count
mem = sprite(spriteNum).member
the keyboardFocusSprite = spriteNum
member(mem).selection = [myTextCount,myTextCount]
What that does is automatically move the cursor to the end of the text. There might be a cleaner way, but that is the general idea.