5 Replies Latest reply on Oct 29, 2009 10:52 AM by Flex harUI

    translate mouse coordinates to selectionBeginIndex?

    timo888 Level 1

      When the user places the mouse over a word in a TextArea (yet doesn't click on it) I am hoping to display some information about the word.


      How would I  discover which Flex methods translate mouse click coordinates to selectionBeginIndex, so I can see how it's done?   Where is the source code located, and how do you open the files in Flex?


      If only the TextArea mouseOver event worked like the TextArea mouseDown event.


      In the mouseDown handler you can do this:


      private function onTextMouseDown(e:MouseEvent):void { 

      // e.target is UITextField and e.currentTarget is TextArea
           var ix:int =    UITextField(e.target).caretIndex;



      But in the mouseOver event, e.target and e.currentTarget are both TextArea, and it seems impossible to get the caretIndex, which requires casting to UITextField, and TextArea cannot be cast to this interface.