MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 676

Actionscript language reference
Table of Contents

Advertisement

Returns
If
was successfully removed, the method returns a
listener
successfully removed—for example, if
the method returns a value of
Description
Method; removes an object previously registered with
Example
The following ActionScript dynamically creates several text field instances. When you select a text
field, information writes to the log file. When you click the
removed and information no longer writes to the log file.
this.createTextField("one_txt", 1, 0, 0, 100, 22);
this.createTextField("two_txt", 2, 0, 25, 100, 22);
this.createTextField("three_txt", 3, 0, 50, 100, 22);
this.createTextField("four_txt", 4, 0, 75, 100, 22);
for (var i in this) {
if (this[i] instanceof TextField) {
this[i].border = true;
this[i].type = "input";
}
}
var selectionListener:Object = new Object();
selectionListener.onSetFocus = function(oldFocus, newFocus) {
trace("Focus shifted from "+oldFocus+" to "+newFocus);
};
Selection.addListener(selectionListener);
remove_btn.onRelease = function() {
trace("removeListener invoked");
Selection.removeListener(selectionListener);
};
See Also
Selection.addListener()
Selection.setFocus()
Availability
Flash Player 5. Instance names for buttons and movie clips work only in Flash Player 6 and later.
Usage
Selection.setFocus(instancePathName:String)
Selection.setFocus(instanceName:Object)
Parameters
instancePathName
instanceName
676
Chapter 7: ActionScript for Flash
listener
.
false
A string specifying the path to a button, movie clip, or text field instance.
A button, movie clip, or text field instance.
value. If
true
was not on the Selection object's listener list—
Selection.addListener()
remove_btn
was not
listener
.
instance, the listener is

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flex

Table of Contents