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

Using Listeners

Just as a single transmitter broadcasts radio waves to thousands of radio receivers, some events can be “broadcast” to any number of objects so that they respond accordingly. You do this by employing what are known as Listeners—events that can be broadcast to objects that have been “registered” to listen for them (listening objects).

Suppose you wanted an object (sound, movie clip, text field, array, or custom) to react to a certain event's being triggered in your movie. You would first create an event handler method for that object:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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