Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


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

11. Power-ups > Use Signals between complex views and their mediators

Use Signals between complex views and their mediators

AS3Signals is a library by Robert Penner which provides an alternative to AS3 Events for communicating between objects. There are a number of reasons why Robert created the library, and the main advantages it provides are:

  • A Signal is a property of a class, which means you can define it on the interface for that class.

  • You can only listen to a Signal if the class has that Signal as a property—unlike events, where you can listen for a TimerEvent on an Elephant if you want to.

  • When you create a Signal, you define the number and type of arguments this Signal is going to dispatch.

  • When you add a handler to a Signal, the Signal does some checking to make sure your handler expects the right number of arguments.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial