650
ActionScript classes
Methods inherited from class Object
addListener (TextField.addListener method)
public addListener(listener:
Object
) : Boolean
Registers an object to receive TextField event notifications. The object will receive event
notifications whenever the
onChanged
and
onScroller
event handlers have been invoked.
When a text field changes or is scrolled, the
TextField.onChanged
and
TextField.onScroller
event handlers are invoked, followed by the
onChanged
and
onScroller
event handlers of any objects registered as listeners. Multiple objects can be
registered as listeners.
To remove a listener object from a text field, call
TextField.removeListener()
.
A reference to the text field instance is passed as a parameter to the
onScroller
and
onChanged
handlers by the event source. You can capture this data by putting a parameter in
the event handler method. For example, the following code uses
txt
as the parameter that is
passed to the
onScroller
event handler. The parameter is then used in a
trace
statement to
send the instance name of the text field to the Output panel.The parameter is then used in a
trace()
method to write the instance name of the text field to the log file.
my_txt.onScroller = function(textfield_txt:TextField) {
trace(textfield_txt._name+" scrolled");
};
Availability:
ActionScript 1.0; Flash Lite 2.0
Parameters
listener
:
Object
- An object with an
onChanged
or
onScroller
event handler.
setNewTextFormat
(tf:
TextFormat
) :
Void
Sets the default new text format of a
text field.
setTextFormat
([beginIndex:
Number
],
[endIndex:
Number
],
textFormat:
TextFormat
) :
Void
Applies the text formatting specified
by the
textFormat
parameter to
some or all of the text in a text field.
addProperty (Object.addProperty method)
,
hasOwnProperty
(Object.hasOwnProperty method)
,
isPropertyEnumerable
(Object.isPropertyEnumerable method)
,
isPrototypeOf (Object.isPrototypeOf
method)
,
registerClass (Object.registerClass method)
,
toString
(Object.toString method)
,
unwatch (Object.unwatch method)
,
valueOf
(Object.valueOf method)
,
watch (Object.watch method)
Modifiers
Signature
Description
Summary of Contents for FLASHLITE2 ACTIONSCRIPT-LANGUAGE
Page 1: ...Flash Lite 2 x ActionScript Language Reference...
Page 22: ...22 Contents...
Page 244: ...244 ActionScript language elements...
Page 760: ...760 ActionScript classes...