break;
case Key.RIGHT :
car_mc._x += DISTANCE;
break;
case Key.DOWN :
car_mc._y += DISTANCE;
break;
}
};
Key.addListener(keyListener_obj);
SHIFT (Key.SHIFT property)
public static SHIFT :
The key code value for the Shift key (16).
Availability: ActionScript 1.0; Flash Lite 2.0
Example
The following example scales
var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
if (Key.isDown(Key.SHIFT)) {
car_mc._xscale = 2;
car_mc._yscale = 2;
} else if (Key.isDown(Key.CONTROL)) {
car_mc._xscale /= 2;
car_mc._yscale /= 2;
}
};
Key.addListener(keyListener);
SPACE (Key.SPACE property)
public static SPACE :
The key code value for the Spacebar (32).
Availability: ActionScript 1.0; Flash Lite 2.0
Number
when you press Shift.
car_mc
Number
Key
387