Addlistener (Textfield.addlistener Method) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Modifiers
Signature
setNewTextFormat(tf:TextFormat) :
Void
setTextFormat([beginIndex:Number],
[endIndex:Number],
textFormat:TextFormat) :
Methods inherited from class Object
addProperty (Object.addProperty
(Object.hasOwnProperty
(Object.isPropertyEnumerable
method),
registerClass (Object.registerClass
(Object.toString
(Object.valueOf
method),

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
When a text field changes or is scrolled, the
TextField.onScroller
event handlers of any objects registered as listeners. Multiple objects can be
onScroller
registered as listeners.
To remove a listener object from a text field, call
A reference to the text field instance is passed as a parameter to the
handlers by the event source. You can capture this data by putting a parameter in
onChanged
the event handler method. For example, the following code uses
passed to the
onScroller
send the instance name of the text field to the Output panel.The parameter is then used in a
method to write the instance name of the text field to the log file.
trace()
my_txt.onScroller = function(textfield_txt:TextField) {
trace(textfield_txt._name+" scrolled");
};
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
- An object with an
listener:Object
650
ActionScript classes
Void
method),
method),
isPropertyEnumerable
method),
method),
unwatch (Object.unwatch
watch (Object.watch method)
and
onChanged
event handlers are invoked, followed by the
event handler. The parameter is then used in a
onChanged
Description
Sets the default new text format of a
text field.
Applies the text formatting specified
by the textFormat parameter to
some or all of the text in a text field.
hasOwnProperty
isPrototypeOf (Object.isPrototypeOf
method),
method),
event handlers have been invoked.
onScroller
TextField.onChanged
TextField.removeListener()
or
onScroller
toString
valueOf
and
and
onChanged
.
and
onScroller
as the parameter that is
txt
statement to
trace
event handler.

Advertisement

Table of Contents
loading

Table of Contents