Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Basic raix.reactive example
var doubleClicks : IObservable = Observable.fromEvent(stage, MouseEvent.CLICK)
.timeInterval()
.filter(function(ti:TimeInterval):Boolean { return ti.interval < 300; })
.removeTimeInterval();
var subscription : ICancelable = doubleClicks.subscribe(function(me:MouseEvent):void
{
trace("Double click");
});
// Unsubscribe (removing all event listeners)
subscription.cancel();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment