• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 20. Basic ActionScript > Using Event Handlers to Trigger Action

Using Event Handlers to Trigger Action

The Flash Player generates an event to signal that something potentially significant has happened in your program. An event is like an announcement. Some object has to be listening for the event and respond to it for it to have any effect. Many built-in objects automatically listen for certain types of events. However, they never respond automatically. You enable a response by giving the responding object an event handler or callback function for a particular event.

If an object doesn't listen for a particular type of event by default, it may be possible to register the object to be a listener for that type of event. You register the object with the designated broadcaster for that type of event. For the example, you can register to receive all Mouse events or all Key (keyboard) events.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint