Skip to Content
Flash 8 Cookbook
book

Flash 8 Cookbook

by Joey Lott
April 2006
Beginner
544 pages
14h 51m
English
O'Reilly Media, Inc.
Content preview from Flash 8 Cookbook

23.5. Making Keyboard-Navigable Movies

Problem

You want to create keyboard shortcuts that duplicate button behaviors, and you want to expose those shortcuts to assistive devices.

Solution

Create keyboard shortcuts that duplicate button actions, using Key.isDown( ). Write code in a modular way, so that it can be accessed in more than one way. Use the Accessibility panel to inform users with assistive devices about the keyboard shortcuts. Specify a logical tab order for buttons, using tabIndex.

Discussion

Movies that rely on buttons to control playback intrinsically rely on users’ ability to click on those buttons with a mouse. One way to make movies functional for those who rely on the keyboard is to create keyboard shortcuts. Buttons can be made accessible in one of two ways:

Default keyboard shortcuts

By default, users can execute button actions by setting the focus on the button and pressing Enter or Return. A disadvantage to this approach is that users must tab to the button, which could become unwieldy in a movie with many buttons. A related issue is tab order.

Custom keyboard shortcuts

The developer creates keyboard shortcuts for certain actions. For example, pressing S stops a movie, while pressing P causes it to start playing again. These require a modest amount of extra work but are generally worth it.

These two approaches to button accessibility are not exclusive, and even when you implement custom keyboard shortcuts, default keyboard shortcuts will still be in place.

If you are ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Flash® CS4 for Dummies®

Flash® CS4 for Dummies®

Ellen Finkelstein, Gurdy Leete

Publisher Resources

ISBN: 0596102402Catalog PageErrata