Istoggled (Key.istoggled Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Returns
- The value
Boolean
Example
The following script lets the user control a movie clip's (
car_mc.onEnterFrame = function() {
if (Key.isDown(Key.RIGHT)) {
this._x += 10;
} else if (Key.isDown(Key.LEFT)) {
this._x -= 10;
}
};

isToggled (Key.isToggled method)

public static isToggled(code:Number) : Boolean
Returns
if the Caps Lock or Num Lock key is activated (toggled to an active state);
true
otherwise. Although the term toggled usually means that something is switched
false
between two options, the method Key.isToggled() will only return
to an active state. On the Macintosh, the key code values for the Caps Lock and Num Lock
keys are identical.
A Flash application can only monitor keyboard events that occur within its focus. A Flash
application cannot detect keyboard events in another application.
Availability: ActionScript 1.0; Flash Player 5
Parameters
- The key code for the Caps Lock key (20) or the Num Lock key (144).
code:Number
Returns
- The value
Boolean
state);
otherwise.
false
if the key specified in
true
if the Caps Lock or Num Lock key is activated (toggled to an active
true
is pressed;
keycode
false
) location:
car_mc
true
otherwise.
if the key is toggled
Key
683

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF