370
ActionScript classes
Example
The following example uses
Function.call()
to make a function behave as a method of
another object, without storing the function in the object:
function myObject() {
}
function myMethod(obj) {
trace("this == obj? " + (this == obj));
}
var obj:Object = new myObject();
myMethod.call(obj, obj);
The
trace()
statement displays:
this == obj? true
See also
apply (Function.apply method)
Key
Object
|
+-Key
public class
Key
extends
Object
The Key class is a top-level class whose methods and properties you can use without a
constructor. Use the methods of the Key class to build an interface that can be controlled by a
user with a standard keyboard. The properties of the Key class are constants representing the
keys most commonly used to control applications, such as Arrow keys, Page Up, and Page
Down.
Availability:
ActionScript 1.0; Flash Lite 2.0
See also
ExtendedKey
Summary of Contents for Flash Lite 2
Page 1: ...Flash Lite 2 x ActionScript Language Reference...
Page 22: ...22 Contents...
Page 244: ...244 ActionScript language elements...
Page 760: ...760 ActionScript classes...