Flash CS4 Professional ActionScript 2.0

Using Function object properties in ActionScript 1.0

NOTE

 

Many Flash users can greatly benefit from using ActionScript 2.0, especially with complex applications. For information on using ActionScript 2.0, see Classes.

You can specify the object to which a function is applied and the parameter values that are passed to the function, using the call() and apply() methods of the Function object. Every function in ActionScript is represented by a Function object, so all functions support call() and apply(). When you create a custom class using a constructor function, or when you define methods for a custom class using a function, you can invoke call() and apply() for the function.