TextField
651
Returns
Boolean
-
Example
The following example defines an
onChanged
handler for the input text field
my_txt
. It then
defines a new listener object,
txtListener
, and defines an
onChanged
handler for that
object. This handler will be invoked when the text field
my_txt
is changed. The final line of
code calls
TextField.addListener
to register the listener object
txtListener
with the text
field
my_txt
so that it will be notified when
my_txt
changes.
this.createTextField("my_txt", this.getNextHighestDepth(), 10, 10, 100,
22);
my_txt.border = true;
my_txt.type = "input";
my_txt.onChanged = function(textfield_txt:TextField) {
trace(textfield_txt._name+" changed");
};
var txtListener:Object = new Object();
txtListener.onChanged = function(textfield_txt:TextField) {
trace(textfield_txt._name+" changed and notified myListener");
};
my_txt.addListener(txtListener);
See also
onChanged (TextField.onChanged handler)
,
onScroller (TextField.onScroller
handler)
,
removeListener (TextField.removeListener method)
_alpha (TextField._alpha property)
public _alpha :
Number
Sets or retrieves the alpha transparency value of the text field. Valid values are 0 (fully
transparent) to 100 (fully opaque). The default value is 100. Transparency values are not
supported for text fields that use device fonts. You must use embedded fonts to use the
_alpha
transparency property with a text field.
Note:
This property is not supported for Arabic, Hebrew, and Thai.
Availability:
ActionScript 1.0; Flash Lite 2.0
Summary of Contents for Flash Lite 2
Page 1: ...Flash Lite 2 x ActionScript Language Reference...
Page 22: ...22 Contents...
Page 244: ...244 ActionScript language elements...
Page 760: ...760 ActionScript classes...