Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
AS3-SignalsAn Introduction        Samuel Asher Rivello        Principal, Rivello Multimedia Consulting                    ...
Topic        Speaker          •Samuel Asher   Rivello is the principal of          Rivello Multimedia Consulting (RMC). RM...
SECTION 1What is AS3-Signals?                       info@RivelloMultimediaConsulting.com                       TM & © 2011...
AgendaThree Sections ~ 30 Minutes   1.   What is AS3-Signals?        •   Overview        •   Implementation   2.   AS3-Sig...
AS3-SignalsOverview  AS3-Signals is an open-source pure AS3 library created  by Robert Penner which facilitates messaging ...
DEMOLets See Traditional Flash EventsIn Action!                             info@RivelloMultimediaConsulting.com          ...
Flash Events Drawbacks        •   Must inherit or compose EventDispatcher        •   Message types stored as error-prone S...
AS3-SignalsBenefits        •   Requires no inheritance        •   Fast to setup (even with custom data)        •   Works w...
AS3-SignalsSyntax 1 – Pass No Data   var signal = new Signal ();   signal.add(_onSignalDispatched); //or signal.addOnce(_o...
AS3-SignalsSyntax 2 – Pass Data   var signal = new Signal (String, MyCustomClass);   signal.add(_onSignalDispatched); //or...
AS3-SignalsTypes of Signals        •   Signal – Pass zero or more arguments        •   DeluxeSignal – Pass GenericEvent (w...
AS3-SignalsOther Cool Features        •   removeAll        •   addOnce        •   numListeners        •   (Event bubbling ...
SECTION 2AS3-Signals Applied                      info@RivelloMultimediaConsulting.com                      TM & © 2011 Ri...
DEMOLets See AS3-Signals in Action!                            info@RivelloMultimediaConsulting.com                       ...
AS3-Signals Adding AS3-Signals to Your Project Download       •   Download and unzip https://github.com/robertpenner/as3-s...
SECTION 3References & QA                  info@RivelloMultimediaConsulting.com                  TM & © 2011 Rivello Multim...
Questions / Comments?Three Sections ~ 30 Minutes   1.   What is AS3-Signals?        •   Overview        •   Implementation...
ReferencesPresentation Questions   Send Questions & Comments   info@RivelloMultimediaConsulting.comConsulting Inquiries (R...
Upcoming SlideShare
Loading in …5
×

RMC Intro to AS3-Signals for Flash And Flex

6,730 views

Published on

AS3-Signals (or 'signals' for short) is a proven alternative to the native AS3 event system.

Published in: Technology
  • Be the first to comment

RMC Intro to AS3-Signals for Flash And Flex

  1. 1. AS3-SignalsAn Introduction Samuel Asher Rivello Principal, Rivello Multimedia Consulting info@RivelloMultimediaConsulting.com TM & © 2011 Rivello Multimedia Consulting
  2. 2. Topic Speaker •Samuel Asher Rivello is the principal of Rivello Multimedia Consulting (RMC). RMC’s Flash and Flex services include software architecture, consulting, development, and training. Sam has a decade of experience creating games and applications, and is currently traveling the globe to collaborate with top companies. Agenda •Learn the benefits and syntax of AS3-Signals Audience •Intermediate to Advanced ActionScript 3.0 Developers Take-Away •Allsource code and documentation will be available to attendees. info@RivelloMultimediaConsulting.com TM & © 2011 Rivello Multimedia Consulting
  3. 3. SECTION 1What is AS3-Signals? info@RivelloMultimediaConsulting.com TM & © 2011 Rivello Multimedia Consulting
  4. 4. AgendaThree Sections ~ 30 Minutes 1. What is AS3-Signals? • Overview • Implementation 2. AS3-Signals Applied • Adding to a new project • Types of Signals 3. Conclusion • References • Q&A info@RivelloMultimediaConsulting.com TM & © 2011 Rivello Multimedia Consulting
  5. 5. AS3-SignalsOverview AS3-Signals is an open-source pure AS3 library created by Robert Penner which facilitates messaging between objects. The signals concept is inspired by C++. AS3-Signals can be used in place of or in addition to flash.events.Event. info@RivelloMultimediaConsulting.com TM & © 2011 Rivello Multimedia Consulting
  6. 6. DEMOLets See Traditional Flash EventsIn Action! info@RivelloMultimediaConsulting.com TM & © 2011 Rivello Multimedia Consulting
  7. 7. Flash Events Drawbacks • Must inherit or compose EventDispatcher • Message types stored as error-prone Strings • Has garbage-collection / clean-up issues • Must subclass flash.events.Event to send custom data.* *Admittedly, with my preferred style of AS3-Signals, I do this too. info@RivelloMultimediaConsulting.com TM & © 2011 Rivello Multimedia Consulting
  8. 8. AS3-SignalsBenefits • Requires no inheritance • Fast to setup (even with custom data) • Works well with native Flash Events (e.g. MouseEvent) • A powerful addition Robotlegs framework* *An unrelated open-source AS3 framework (Robotlegs.org) info@RivelloMultimediaConsulting.com TM & © 2011 Rivello Multimedia Consulting
  9. 9. AS3-SignalsSyntax 1 – Pass No Data var signal = new Signal (); signal.add(_onSignalDispatched); //or signal.addOnce(_onSignalDispatched); signal.dispatch(); private function _onSignalDispatched () : void { Trace (“onSignalDispatched: “); } info@RivelloMultimediaConsulting.com TM & © 2011 Rivello Multimedia Consulting
  10. 10. AS3-SignalsSyntax 2 – Pass Data var signal = new Signal (String, MyCustomClass); signal.add(_onSignalDispatched); //or signal.addOnce(_onSignalDispatched); signal.dispatch(); private function _onSignalDispatched (s : String, c : MyCustomClass) : void { Trace (“onSignalDispatched: “ + s + “ and “ + c); } info@RivelloMultimediaConsulting.com TM & © 2011 Rivello Multimedia Consulting
  11. 11. AS3-SignalsTypes of Signals • Signal – Pass zero or more arguments • DeluxeSignal – Pass GenericEvent (w/ target & Signal) • NativeSignal – Connects a Signal with a Flash Event (e.g. MouseEvent) • NativeRelaySignal* (Basically its DeluxeSignal + NativeSignal) * Not shown in my demo code. info@RivelloMultimediaConsulting.com TM & © 2011 Rivello Multimedia Consulting
  12. 12. AS3-SignalsOther Cool Features • removeAll • addOnce • numListeners • (Event bubbling is coming soon) * Thanks to Peter Elst for this information. info@RivelloMultimediaConsulting.com TM & © 2011 Rivello Multimedia Consulting
  13. 13. SECTION 2AS3-Signals Applied info@RivelloMultimediaConsulting.com TM & © 2011 Rivello Multimedia Consulting
  14. 14. DEMOLets See AS3-Signals in Action! info@RivelloMultimediaConsulting.com TM & © 2011 Rivello Multimedia Consulting
  15. 15. AS3-Signals Adding AS3-Signals to Your Project Download • Download and unzip https://github.com/robertpenner/as3-signals Add SWC to project: • Flash Builder (libs), FDT (libs), Flash CS5 (See External Library Path) 15 v15 info@RivelloMultimediaConsulting.com TM & © 2011 Rivello Multimedia Consulting
  16. 16. SECTION 3References & QA info@RivelloMultimediaConsulting.com TM & © 2011 Rivello Multimedia Consulting
  17. 17. Questions / Comments?Three Sections ~ 30 Minutes 1. What is AS3-Signals? • Overview • Implementation 2. AS3-Signals Applied • Adding to a new project • Types of Signals 3. Conclusion • References • Q&A info@RivelloMultimediaConsulting.com TM & © 2011 Rivello Multimedia Consulting
  18. 18. ReferencesPresentation Questions Send Questions & Comments info@RivelloMultimediaConsulting.comConsulting Inquiries (RivelloMultimediaConsulting.com) Software Architecture, Consulting, Development, & Training. info@RivelloMultimediaConsulting.com info@RivelloMultimediaConsulting.com TM & © 2011 Rivello Multimedia Consulting

×