If beginIndex and endIndex are equal, the newText is inserted immediately before the specified beginIndex
package{
import flash.display.Sprite;
import flash.text.*;
public class Main extends Sprite{
public function Main(){
var t:TextField = new TextField( );
t.text = "mat";
t.replaceText(2, 2, "s");
trace(t.text); // Displays: mast
addChild(t);
}
}
}
Related examples in the same category