Adobe FLEX 2-PROGRAMMING ACTIONSCRIPT 3.0 Manual page 345

Programming actionscript 3.0
Table of Contents

Advertisement

13
CHAPTER 13
Handling Events
An event handling system allows programmers to respond to user input and system events in a
convenient way. The new ActionScript 3.0 event model is not only convenient, but also
standards-compliant, and well integrated with the new Adobe Flash Player 9 display list.
Based on the Document Object Model (DOM) Level 3 Events Specification, an industry-
standard event handling architecture, the new event model provides a powerful yet intuitive
event handling tool for ActionScript programmers.
This chapter is organized in five sections. The first two sections provide background
information about event handling in ActionScript. The last three sections describe the main
concepts behind the new event model: the event flow, the event object, and event listeners.
The ActionScript 3.0 event handling system interacts closely with the display list, and this
chapter assumes that you have a basic understanding of the display list. For more information,
see
"Display Programming" on page
159.
Contents
Introduction to Event Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .346
The event flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
Event objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .352
Event listeners. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Example: Alarm Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .365
345

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex

Table of Contents