Accessibility
Total Training

Total Training

 

Created:
5 March 2007
User Level:
Beginner
Products:
Devices

Total Training video: Handling device key press events

Get your feet wet with an introduction to the Flash Lite player and understand some of the basic differences between mobile-specific issues and the desktop version of Flash Player. Then move on to how to develop the user interface, work with class-based development techniques, and use external data and XML socket connections.

The presenter, Dale Rankine, wraps up the lessons by teaching you how to work with external media and platforms, as well as explains some of the wider issues for developers starting out with Flash Lite and mobile content development.

In "Handling device key press events," you will learn about:

  • Adding ActionScript 2.0 to control soft keys
  • Creating a global key listener
  • Defining key functions
  • Changing visual content on key events

Requirements

To complete this tutorial you will need to install the following software:

Flash Professional 8

Adding ActionScript 2.0 to control soft keys

This short tutorial is about handling user events. You will learn about setting a soft key's labels. You will also learn about the broadcaster/listener model, which is how object-oriented languages handle user events.

Adding ActionScript to control soft keys

Figure 1. Adding ActionScript to control soft keys

Creating a global key listener

This short tutorial is about adding ActionScript that actually captures the key press events. You will learn how to add global key listeners into your program, and how to use the listener to call a function.

Creating a global key listener

Figure 2. Creating a global key listener

Defining key functions

This short tutorial is about writing a new user-defined function that will get triggered every time the target key is triggered by the user. You will also learn how to use conditional logic to define responses to specific keys being pressed.

Defining key functions

Figure 3. Defining key functions

Changing visual content on key events

This short tutorial is about adding user-defined functions to handle what will happen whenever a specific key is pressed by creating modular code. You then learn how to use conditional logic to change the current state of the user's screen.

Changing visual content on key events

Figure 4. Changing visual content on key events

Where to go from here

You can learn more about Flash Lite 2.1 and Total Training through the following resources:

About the author

Total Training, Inc. is a pioneer in video-based training for leading software applications. The full product line offers comprehensive lessons and tutorials on creative design, web design, digital video, web development, and office productivity programs. Total Training is best known for its superior product quality, entertaining content and strategic partnership with Adobe which includes tutorials in Adobe software boxes. Visit Total Training to learn more.