Biteboard

For my upcoming speak at FlashVision, I’ve made a little demo of a multiuser whiteboard application entitled Biteboard, which can be demoed here.

Source code will be available late saturday, when I’m fully settled back in mainland Denmark and final corrections and documentation have been completed. It will of course adhere to the given license.

The server is made by my good friend Mads Jørgensen (at swag.dk), and it will as well be published under some some rights reserved Creative Commons license.

My primary love for this simple application is a new – but very simple – event listener model. The event dispatching is done via the regular EventDispatcher-model, but the event listener signup is done by implementing the interfaces with the events to listen for and dedicated signup methods for the actual listeners.

This can be examplified by for instance listening to connection changes:

public function addConnectionListener(cl:ConnectionListener):Void {
	addEventListener("onConnect", cl);
	addEventListener("onDisconnect", cl);
}

It is evident, that the ConnectionListener defines the two methods: onConnect and onDisconnect. Event dispatching is still done simply via dispatchEvent("onConnect").

I considered having the communication class implementing all these interfaces and having shim methods for all these call (thus type checking while dispatching as well as while listening), but the excess of writing those functions within the same class that would call them (or directly dispatch themselves) did not seem worth it.

Anyway, you can judge for yourself when the complete source will be available saturday.

Related posts:

  1. Why events suck in ActionScript 3

Category: AS2 Comment »


Leave a Reply



Back to top

     

Get Adobe Flash playerPlugin by wpburn.com wordpress themes