EasyManua.ls Logo

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT - Page 608

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT
816 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
608 Chapter 12: ActionScript Dictionary
Method summary for the Selection class
Listener summary for the Selection class
Selection.addListener()
Availability
Flash Player 6.
Usage
Selection.addListener(newListener)
Parameters
newListener
An object with an onSetFocus method.
Returns
None.
Description
Method; registers an object to receive keyboard focus change notifications. When the focus
changes (for example, whenever
Selection.setFocus() is invoked), all listening objects
registered with addListener() have their onSetFocus method invoked. Multiple objects may
listen for focus change notifications. If the listener
newListener is already registered, no
change occurs.
Method Description
Selection.addListener()
Registers an object to receive notification when onSetFocus is
invoked.
Selection.getBeginIndex()
Returns the index at the beginning of the selection span. Returns -1 if
there is no index or currently selected field.
Selection.getCaretIndex()
Returns the current caret (insertion point) position in the currently
focused selection span. Returns -1 if there is no caret position or
currently focused selection span.
Selection.getEndIndex()
Returns the index at the end of the selection span. Returns -1 if there
is no index or currently selected field.
Selection.getFocus()
Returns the name of the variable for the currently focused text field.
Returns
null if there is no currently focused text field.
Selection.removeListener()
Removes an object that was registered with addListener().
Selection.setFocus()
Focuses the text field associated with the specified variable.
Selection.setSelection()
Sets the beginning and ending indexes of the selection span.
Listener Description
Selection.onSetFocus
Notified when the input focus changes.

Table of Contents

Related product manuals