The following table lists the ActionScript keypress event that Flash Lite generates in response
to the user pressing a key on the device:
Device key
0-9, *, #
Select key
Left Arrow key
Right Arrow key
Up Arrow key
Down Arrow key
Left soft key
Right soft key
Creating a key catcher button (Flash Professional
Only)
If your application must handle several different keypress events you could either create a
single button for each keypress event, or use a single button to handle all keypress events.
This type of button is commonly called a key catcher (or key listener) button. Because the
key catcher button isn't supposed to be visible to the user, it usually sits off the Stage (in the
work area).
The following procedures demonstrate how to use a key catcher button to handle keypress
events in a simple application. The application lets the user move a circle around the Stage by
pressing the four arrow keys on their device.
You can find a completed version of this application, key_catcher.fla, in the Samples folder on
your hard disk:
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\
Samples and Tutorials\Samples\FlashLite.
On the Macintosh, browse to Macintosh HD/Applications/Macromedia Flash 8/
Samples and Tutorials/Samples/FlashLite.
14
Creating Interactivity and Navigation
ActionScript key event
0
1
2
3
4
5
6
,
,
,
,
,
,
,
9
*
#
-
,
,
<Enter>
<Left>
<Right>
<Up>
<Down>
<PageUp>
<PageDown>
Availability
All devices
7
8
,
,
All devices
Devices that support four-way
navigation, only.
Devices that support four-way
navigation, only.
Devices that support four-way
navigation, only.
Devices that support four-way
navigation, only.
Devices that support the
command, only.
Devices that support the
command, only.
SetSoftKeys
SetSoftKeys
Need help?
Do you have a question about the FLASH 8-DEVELOPING FLASH LITE and is the answer not in the manual?
Questions and answers