I’d like to do tooltip-type popups with some text. Is there an easy way to get the word under the mouse? Right now I’m reading the entire text field into an array where the index of the element is the number of the character, like so:
var theString:String = 'This is some text.";
and the array looks like this:
[‘This’, ‘This’, ‘This’, ‘This’, ‘’, ‘is’, ‘is’, ‘’, ‘some’, ‘some’, ‘some’, ‘some’, ’ ', ‘text’, ‘text’, ‘text’, ‘text’, ‘.’]
So the getCharIndexAtPoint function with the mouseX and mouseY is used as an index to the array, which returns the correct word. It works, but it seems like a crude way to go about it. Is there any way to get the html text of the link if the mouse is hovering over a word?