Delegate.create()

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX Professional 2004.

Usage

Delegate.create(scopeObject, function)

Parameters

scopeObject A reference to an object. This is the scope in which to run the function.

function A reference to a function.

Description

Method (static); allows you to delegate events to specific scopes and functions. Use the following syntax:

import mx.utils.Delegate;
compInstance.addEventListener("eventName", Delegate.create(scopeObject, function));

The scopeObject parameter specifies the scope in which the specified function is called.

Example

For examples of Delegate.create(), see Delegating events in Using ActionScript 2.0 Components.

See also

EventDispatcher.addEventListener()


Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00002894.html