TextField.replaceSelectedText(value:String):void
可以使用此方法插入和删除文本而不破坏其余文本的字符和段落格式.
- 作者:SWFAQ | http://swfaq.org
-
关键字
TextField.replaceSelectedText(value:String):void
可以使用此方法插入和删除文本而不破坏其余文本的字符和段落格式.
- 作者:SWFAQ | http://swfaq.org
请使用此方法:
TextField.getParagraphLength(charIndex:int):int
- 作者:SWFAQ | http://swfaq.org
TextField.replaceText(beginIndex:int, endIndex:int, newText:String):void
注意: 如果对文本字段应用了样式表,则该方法不起作用
- 作者:SWFAQ | http://swfaq.org
在 x 和 y 参数指定的位置返回从零开始的字符索引值
TextField.getCharIndexAtPoint(x:Number, y:Number):int
例子:
field.getCharIndexAtPoint(mouseX, mouseY); //返回鼠标位置上的该字符的索引值
- 作者:SWFAQ | http://swfaq.org
在 x 和 y 参数指定的位置返回从零开始的行索引值
TextField.getLineIndexAtPoint(x:Number, y:Number):int
field.getLineIndexAtPoint(mouseX, mouseY); //返回鼠标位置上的该行的索引值
- 作者:SWFAQ | http://swfaq.org
请使用此方法,指定字符的索引由参数 charIndex 指出:
TextField.getLineIndexOfChar(charIndex:int):int
- 作者:SWFAQ | http://swfaq.org
使用此方法:
TextField.getLineLength(lineIndex:int):int
- 作者:SWFAQ | http://swfaq.org
请使用此方法:
TextField.getLineOffset(lineIndex:int):int
- 作者:SWFAQ | http://swfaq.org
请使用此方法:
TextField.getLineText(lineIndex:int):String
- 作者:SWFAQ | http://swfaq.org
如果给定一个字符索引,则返回同一段落中第一个字符的索引
TextField.getFirstCharInParagraph(charIndex:int):int
- 作者:SWFAQ | http://swfaq.org