pshtif/Genome2D — pull request #6 by vaukalak (2013-11-13 09:13:05+00:00)
Title: Update GFlashText.as

there is no need of "-1", just test your code with this:

textField.text = "a";
if(textField.text.length > 0){
textField.setTextFormat(new TextFormat(), 0, textField.length - 1);
}
textField.text = "_";

you'll get RTE:

[Fault] exception, information=RangeError: Error #2006: The supplied index is out of bounds.
at flash.text::TextField/setTextFormat()