hmmmmmmmmm.....
FORSE E' UN COMANDO SOLO DI FLASH LITE ....
codice:
replaceText (TextField.replaceText method)
public replaceText(beginIndex:Number, endIndex:Number, newText:String) : Void
Replaces a range of characters, specified by the beginIndex and endIndex parameters, in the specified text field with the contents of the newText parameter.
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
beginIndex:Number - The start index value for the replacement range.
endIndex:Number - The end index value for the replacement range.
newText:String - The text to use to replace the specified range of characters.
Example
The following example creates a text field called my_txt and assigns the text dog@house.net to the field. The indexOf() method is used to find the first occurrence of the specified symbol (@). If the symbol is found, the specified text (between the index of 0 and the symbol) replaces with the string bird. If the symbol is not found, an error message is displayed in the Output panel.If the symbol is not found, an error message writes to the log file.
this.createTextField("my_txt", this.getNextHighestDepth(), 10, 10, 320, 22);
my_txt.autoSize = true;
my_txt.text = "dog@house.net";
var symbol:String = "@";
var symbolPos:Number = my_txt.text.indexOf(symbol);
if (symbolPos>-1) {
my_txt.replaceText(0, symbolPos, "bird");
} else {
trace("symbol '"+symbol+"' not found.");
}