In the Shortcut field, type the name of the keyboard shortcut, using the following conventions:
3.
Spell out key names, such as Control or Alt.
Use capital letters for alphabetic characters.
Use a plus sign (+) between key names, with no spaces (for example, Control+A).
Warning: Flash does not check that the ActionScript to code the keyboard shortcut has been
created.
Keyboard shortcut example
To create a keyboard shortcut, Control+7, for a button with the instance name myButton, you
would do the following:
Select the object on the Stage, display the Accessibility panel, and in the Shortcut field, type
1.
Control+7.
Enter the following code in the Actions panel:
2.
function myOnPress() {
trace( "hello" );
}
function myOnKeyDown() {
if (Key.isDown(Key.CONTROL) && Key.getCode() == 55) // 55 is key code for
7
{
Selection.setFocus( myButton );
myButton.onPress();
}
}
var myListener = new Object();
myListener.onKeyDown = myOnKeyDown;
Key.addListener( myListener );
myButton.onPress = myOnPress;
myButton._accProps.shortcut = "Ctrl+7"
Accessibility.updateProperties();
Note: The example assigns the keyboard shortcut Control+7 to a button with an instance name of
myButton and makes information about the shortcut available to screen readers. In this example,
when you press Control+7 the
Key.addListener() in Flash ActionScript Language Reference.
Making an entire Flash application accessible
After a Flash document is complete and ready to be published, make the entire Flash
application accessible.
To define accessibility for an entire Flash application:
When the Flash document is complete and ready to be published or exported, deselect all
1.
elements in the document and do one of the following:
Select Window > Properties if the inspector is not visible. In the Property inspector, click
the Accessibility button.
Select Window > Other Panels > Accessibility.
function displays the text "hello" in the Output panel. See
myOnPress
Using Flash to enter accessibility information for screen readers
365