CAPSLOCK (Key.CAPSLOCK property)
public static CAPSLOCK :
The key code value for the Caps Lock key (20).
Availability: ActionScript 1.0; Flash Lite 2.0
CONTROL (Key.CONTROL property)
public static CONTROL :
The key code value for the Control key (17).
Availability: ActionScript 1.0; Flash Lite 2.0
DELETEKEY (Key.DELETEKEY property)
public static DELETEKEY :
The key code value for the Delete key (46).
Availability: ActionScript 1.0; Flash Lite 2.0
Example
The following example lets you draw lines with the mouse pointer using the Drawing API and
listener objects. Press the Backspace or Delete key to remove the lines that you draw.
this.createEmptyMovieClip("canvas_mc", this.getNextHighestDepth());
var mouseListener:Object = new Object();
mouseListener.onMouseDown = function() {
this.drawing = true;
canvas_mc.moveTo(_xmouse, _ymouse);
canvas_mc.lineStyle(3, 0x99CC00, 100);
};
mouseListener.onMouseUp = function() {
this.drawing = false;
};
mouseListener.onMouseMove = function() {
if (this.drawing) {
canvas_mc.lineTo(_xmouse, _ymouse);
}
updateAfterEvent();
};
Mouse.addListener(mouseListener);
//
var keyListener:Object = new Object();
374
ActionScript classes
Number
Number
Number