374
ActionScript classes
CAPSLOCK (Key.CAPSLOCK property)
public static CAPSLOCK :
Number
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 :
Number
The key code value for the Control key (17).
Availability:
ActionScript 1.0; Flash Lite 2.0
DELETEKEY (Key.DELETEKEY property)
public static DELETEKEY :
Number
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();
Содержание Flash Lite 2
Страница 1: ...Flash Lite 2 x ActionScript Language Reference...
Страница 22: ...22 Contents...
Страница 244: ...244 ActionScript language elements...
Страница 760: ...760 ActionScript classes...