Removetextfield (Textfield.removetextfield Method); Replacetext (Textfield.replacetext Method) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

};
my_txt.addListener(txtListener);
removeListener_btn.onRelease = function() {
trace("Removing listener...");
if (!my_txt.removeListener(txtListener)) {
trace("Error! Unable to remove listener");
}
};
removeTextField (TextField.removeTextField
method)
public removeTextField() : Void
Removes the text field. This operation can only be performed on a text field that was created
with
MovieClip.createTextField()
This method is similar to
Availability: ActionScript 1.0; Flash Lite 2.0
Example
The following example creates a text field that you can remove from the Stage when you click
the remove_btn instance. Create a button and call it
ActionScript to your FLA or ActionScript file.
this.createTextField("my_txt", this.getNextHighestDepth(), 10, 10, 300,
22);
my_txt.text = new Date().toString();
my_txt.border = true;
remove_btn.onRelease = function() {
my_txt.removeTextField();
};

replaceText (TextField.replaceText method)

public replaceText(beginIndex:Number, endIndex:Number, newText:String) :
Void
Replaces a range of characters, specified by the
specified text field with the contents of the
Availability: ActionScript 1.0; Flash Lite 2.0
674
ActionScript classes
. When you call this method, the text field is removed.
MovieClip.removeMovieClip()
newText
.
, and then add the following
remove_btn
and
beginIndex
endIndex
parameter.
parameters, in the

Advertisement

Table of Contents
loading

Table of Contents