524
Creating Accessible Content
Keyboard shortcut example
To create a keyboard shortcut, 7, for a button with the instance name myButton,
you would do the following:
1.
Select the object on the Stage, display the Accessibility panel, and in the Shortcut field, type
7
.
2.
Enter the following code in the Actions panel:
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();
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:
1.
When the Flash document is complete and ready to be published or exported, deselect all
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.
NO
TE
The example assigns the keyboard shortcut 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 7 the
myOnPress
function displays
the text “hello” in the Output panel. See
addListener (IME.addListener method)
in
ActionScript 2.0 Language Reference.
Содержание FLASH 8-FLASH
Страница 1: ...Using Flash ...
Страница 12: ...12 Contents ...
Страница 110: ...110 Using Symbols Instances and Library Assets ...
Страница 128: ...128 Working with Color Strokes and Fills ...
Страница 156: ...156 Drawing ...
Страница 190: ...190 Working with Text ...
Страница 224: ...224 Working with Graphic Objects ...
Страница 270: ...270 Creating Motion ...
Страница 310: ...310 Working with Video ...
Страница 362: ...362 Working with Screens Flash Professional Only ...
Страница 386: ...386 Creating Multilanguage Text ...
Страница 454: ...454 Data Integration Flash Professional Only ...
Страница 500: ...500 Publishing ...
Страница 534: ...534 Creating Accessible Content ...