EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - TAB (Key.tab Property); UP (Key.up Property)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Key 691
break;
case Key.RIGHT :
car_mc._x += DISTANCE;
break;
case Key.DOWN :
car_mc._y += DISTANCE;
break;
}
};
Key.addListener(keyListener_obj);
TAB (Key.TAB property)
public static TAB : Number
The key code value for the Tab key (9).
Availability: ActionScript 1.0; Flash Player 5
Example
The following example creates a text field, and displays the date in the text field when you
press Tab.
this.createTextField("date_txt", this.getNextHighestDepth(), 0, 0, 100,
22);
date_txt.autoSize = true;
var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
if (Key.isDown(Key.TAB)) {
var today_date:Date = new Date();
date_txt.text = today_date.toString();
}
};
Key.addListener(keyListener);
When you use this example, be sure to select Control > Disable Keyboard Shortcuts in the test
environment.
The
MovieClip.getNextHighestDepth() method used in this example requires Flash Player
7 or later. If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the
MovieClip.getNextHighestDepth() method.
UP (Key.UP property)
public static UP : Number
The key code value for the Up Arrow key (38).
Availability: ActionScript 1.0; Flash Player 5

Table of Contents

Related product manuals