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");
}
};
TextField.removeTextField()
Availability
Flash Player 6.
Usage
my_txt.removeTextField() : Void
Description
Method; removes the text field specified by
text field that was created with
text field is removed. This method is similar to
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 AS 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();
};
TextField.replaceSel()
Availability
Flash Player 6.
Usage
my_txt.replaceSel(text:String) : Void
Parameters
A string.
text
. This operation can only be performed on a
my_txt
MovieClip.createTextField()
MovieClip.removeMovieClip()
remove_btn
. When you call this method, the
.
, and then add the following
TextField.replaceSel()
743
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?