What is AS3-Signals?
AS3-Signals (or ‘signals’ for short) is a proven alternative to the native AS3 event system.
You can see that only line 4 is different.
//CREATE _person = new Person("Sam"); //LISTEN _person.addEventListener(PersonEvent.GREETED, _onPersonGreeted); //CALL _person.greet("Hello!");
//CREATE _robot = new Robot("Robot"); //LISTEN _robot.signal.add(_onRobotSignalGreeted); //CALL _robot.greet("It is me, the Robot!");
What about the speed of AS3-Signals vs Events?
See this image from Ross Gerbasi showing a comparison in milliseconds (lower # is better/faster).
AS3-Signals and Robotlegs
I am a big fan of the Robotlegs framework for AS3. I’ve written about it many times. AS3-Signals is a completely separate project, but WOW these two play really nice together. In my series of custom project templates I created a specific Robotlegs w/ AS3-Signals Template. On a recent client project I chose Robotlegs and added in the optional AS3-Signals project.
- Checkout the proof that AS3-Signals are FASTER than events!
- Read this good article and code on AS3-Signals for Robotlegs.
- See this nice overview of AS3-Signals
- Checkout the HD Tutorial Video and full source code for this post (See ‘Member Resources’ below).
[private_Free member]Enjoy this members-only content!
HD Video Screencast
- Download the AS3-Signals Presentation RMC_Intro_AS3-Signals_v1.pdf for more background information.
- Download the GIT source AS3SignalsDemo.
- See my template combining RobotLegs + AS3-signals
- See my template combining FlexMobile + RobotLegs + AS3-signals