Coder Social home page Coder Social logo

creynders / as3-signals Goto Github PK

View Code? Open in Web Editor NEW

This project forked from robertpenner/as3-signals

3.0 2.0 1.0 3.16 MB

Signals is a new approach for AS3 events, inspired by C# events and signals/slots in Qt.

Home Page: http://robertpenner.com/flashblog/

License: MIT License

ActionScript 100.00%

as3-signals's Introduction

Signals: Think Outside the Event.

Signals are light-weight, strongly-typed AS3 messaging tools.
Wire your application with better APIs and less boilerplate than AS3 Events.

Concept

  • A Signal is essentially a mini-dispatcher specific to one event, with its own array of listeners.
  • A Signal gives an event a concrete membership in a class.
  • Listeners subscribe to real objects, not to string-based channels.
  • Event string constants are no longer needed.
  • Signals are inspired by C# events and signals/slots in Qt.

Syntax

// with EventDispatcher
button.addEventListener(MouseEvent.CLICK, onClick);

// Signal equivalent; past tense is recommended
button.clicked.add(onClicked);

I am still looking for impressions, critiques and suggestions.
My email is robert at robertpenner.com.
I’m @robpenner on Twitter.

Background on AS3 Events

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.