CS4 caretIndex(point position) in textField using action script
The caretIndex means the index of the point(caret) position.
import fl.controls.TextInput;
import fl.controls.Label;
var textfield:TextField = new TextField();
textfield.x = textfield.y = 100;
textfield.width = textfield.height = 100;
textfield.text = "blog.totusinfo.com";
addChild(textfield);
textfield.addEventListener(MouseEvent.CLICK, caretindex);
function caretindex(event:MouseEvent):void {
var textfield:TextField = TextField(event.target);
var myLabel:Label = new Label();
myLabel.text = "Caret Index";
myLabel.x = 10;
myLabel.y = 10;
addChild(myLabel);
var textInput:TextInput = new TextInput();
textInput.x = 75;
textInput.y = 10;
textInput.text = String(textfield.caretIndex);
addChild(textInput);
}