698 Chapter 12: ActionScript Dictionary
TextField.removeTextField()
Availability
Flash Player 6.
Usage
my_txt.removeTextField()
Description
Method; removes the text field specified by my_txt. This operation can only be performed on a
text field that was created with
MovieClip.createTextField(). When you call this method, the
text field is removed. This method is similar to
MovieClip.removeMovieClip().
TextField.replaceSel()
Availability
Flash Player 6.
Usage
my_txt.replaceSel(text)
Parameters
text
A string.
Returns
Nothing.
Description
Method; replaces the current selection with the contents of the text parameter. The text is
inserted at the position of the current selection, using the current default character format and
default paragraph format. The text is not treated as HTML, even if the text field is an HTML
text field.
You can use the
replaceSel() method to insert and delete text without disrupting the character
and paragraph formatting of the rest of the text.
You must use
Selection.setFocus() to focus the field before issuing this command.
See also
Selection.setFocus()