Selection.addListener( ) Method

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
Selection.addListener( ) Method Flash 6

register an object to receive onSetFocus( ) event notices
Selection.addListener(listener)

Arguments

listener

An object with an onSetFocus( ) method defined.

Description

The addListener( ) method adds listener to the list of objects notified when Selection's onSetFocus( ) event occurs. The listener argument is an object of any class that defines a method by the name onSetFocus; the method is invoked when the onSetFocus( ) event occurs for Selection. To stop a listener object from receiving events, use Selection.removeListener( ).

Multiple objects can respond independently to each onSetFocus( ) event. When multiple listeners are registered to Selection, their methods are invoked in the order the listeners were added.

For sample Selection.addListener( ) code, see Selection.onSetFocus( ). For general information on how listeners and callback functions work, see Chapter 10.

See Also

Selection.onSetFocus( ), Selection.removeListener( ); Chapter 10



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net