Removetextfield (Textfield.removetextfield Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Returns
- If
Boolean
listener
was not successfully removed (for example, if
listener
object's listener list), the method returns a value of
Example
The following example creates an input text field called
field, information about the number of characters in the text field is displayed in the Output
panel. If the user clicks the
information is no longer displayed.
this.createTextField("my_txt", this.getNextHighestDepth(), 10, 10, 160,
20);
my_txt.border = true;
my_txt.type = "input";
var txtListener:Object = new Object();
txtListener.onChanged = function(textfield_txt:TextField) {
trace(textfield_txt+" changed. Current length is:
"+textfield_txt.length);
};
my_txt.addListener(txtListener);
removeListener_btn.onRelease = function() {
trace("Removing listener...");
if (!my_txt.removeListener(txtListener)) {
trace("Error! Unable to remove listener");
}
};
The
MovieClip.getNextHighestDepth()
7 or later. If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the
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 Player 6
1200 ActionScript classes
was successfully removed, the method returns a
removeListener_btn
method used in this example requires Flash Player
MovieClip.getNextHighestDepth()
. When you call this method, the text field is removed.
MovieClip.removeMovieClip()
was not on the TextField
listener
.
false
. When the user types into the
my_txt
instance, then the listener is removed and
.
value. If
true
method.

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF