Using Objects in ActionScript > Controlling classes or methods with Function object properties

 

Controlling classes or methods with Function object properties

You can specify the object that a function is applied to 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 the call and apply methods. 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 the call and apply methods for the function.