-
Notifications
You must be signed in to change notification settings - Fork 0
whitered/Signaller
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
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);
}
}
About
ActionScript signals implementation with restricted rights for dispatching
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published