Table of Contents

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


Table of Contents