I am making something in Actionscript 3, where people can modify a piece of text, within a TextArea. Now, it's easy to get the typed character, but using event.getChar.
But, I would also like to know where the character was typed: the (text)cursor position. I've read about that it's easy to do with a TextField, however, I want to use a TextArea for a few reasons:
I've read about it being possible with a TextField, but I'm not sure how I would make that into an input field...
Also, the TextArea is recommended for multiline text.
If I could hack a TextField to behave like a TextArea, I'm fine with that.
So, my question: How can I get the position of the cursor in a TextArea?
or
How can I make a TextField behave like a TextArea?
EDIT: I managed to make an input TextField, but the caretIndex returns xyz coordinates, pretty useless for text editing/comparing... Any suggestions on that?