Flash CS3 Documentation |
|||
| Using ActionScript 2.0 Components > Handling Component Events | |||
Every component has events that are broadcast when a user interacts with it (for example, the click and change events) or when something significant happens to the component (for example, the load event). To handle an event, you write ActionScript code that executes when the event occurs.
Each component broadcasts its own set of events. This set includes the events of any class from which the component inherits. This means that all components, except the media components, inherit events from the UIObject and UIComponent classes, because they are the base classes of the version 2 architecture. To see the list of events a component broadcasts, see the component's entry and its ancestor classes' entries in the Action Script 2.0 Components Language Reference.
This chapter uses several versions of a simple Flash application, TipCalculator, to teach you how to handle component events. For a sample of TipCalculator, see the Flash Samples page at www.adobe.com/go/learn_fl_samples.
This chapter contains the following sections:
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00002447.html