Do you mean once the text has been highlighted by the mouse?
This is probably a little hacked together but it sets the colour of whatever text gets highlighted to black
code:
highligted = new TextFormat(); // a new textformat object
highlighted.color = 0x000000; // black text
this.createTextField("myText_txt", 1, 10, 10, 100, 20); // create the textfield
myText_txt.text = "some text to test the highlighting";
myText_txt.textColor = 0xff9900; // by default the text is orange
myText_txt.autoSize = "left"; // fit the textbox to the text
myText_txt.onMouseUp = function() { // when the mouse button is lifted do something
this.setTextFormat(Selection.getBeginIndex(), Selection.getEndIndex, highlighted); // apply the highlighted text format object to the selected text
};
Mouse.addListener(myText_txt); // make the textfield listen for mouse events (so it knows what onMouseUp is)
You could also add key events to the textfield (in the a similar way by making the textfield a listener for the Key object) for if the user highlighted text using the shift and arrow keys.