Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/whitered/Signaller
ActionScript signals implementation with restricted rights for dispatching
https://github.com/whitered/Signaller
Last synced: about 2 months ago
JSON representation
ActionScript signals implementation with restricted rights for dispatching
- Host: GitHub
- URL: https://github.com/whitered/Signaller
- Owner: whitered
- Created: 2010-04-27T13:24:11.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2010-04-28T12:45:29.000Z (over 14 years ago)
- Last Synced: 2024-08-04T05:03:02.234Z (5 months ago)
- Language: ActionScript
- Homepage:
- Size: 93.8 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme
Awesome Lists containing this project
- awesome-actionscript-sorted - Signaller - ActionScript signals implementation with restricted rights for dispatching (Frameworks / Signals Framework)
README
Signaller ActionScript library.
Signal represents an event and allows to listen for it.
Signaller is a wrapper on Singal class. It gives the ability to dispatch events.
Both this classes are implement ISignal interface.
Typical usage:
class Ticker
{
private const _onTick:Signaller = new Signaller();
public const onTick:Signal = _onTick.signal;private function doSomething():void
{
...
_onTick.dispatch("tick!");
}
}class TickerManager
{
public function workWithTicker(ticker:Ticker):void
{
ticker.onTick.add(handleTick);// It's impossible to dispatch onTick signal from outside of the ticker
// ticker.onTick.dispatch() - will fail
}private function handleTick(tickerMessage:String):void
{
ticker.onTick.remove(handleTick);
}
}