Creating a simple shared whiteboard application in red5 is very easy, All you need is to get the corrdinates and put them in the shared object and let shared object work for you.
On Client Side:- We have a shared object say
var whiteboard_SO:SharedObject = SharedObject।getRemote("whiteboard",nc.uri,"false");
Now when we move mouse pointer over a movie clip for drawing , we capture the xmouse and ymouse to send them to server. For Example.
sample_MC.onPress = function(){
//Send xmouse and ymouse to server along with "press" event string
NetConnectionObj.call("somemethod", null,param1, param2,param3); //sending values
};
sample_MC.onMouseMove = function(){
//Send xmouse ymouse along with "move" event string
NetConnectionObj.call("somemethod", null,param1, param2,param3); //sending values
}
Now on server(java) side change the shared object with these values
E.g.
public void somemethod(Object[] params){
whiteboard_SO.setAttribute("point",params[0].toString()+":"+params[1].toString()+":"+params[2].toString());
// The above code will fire the onSync event on all connected clients.
}
Now on Client side :-
Whiteboard_SO.onSync = function(infolist){
// Inside the change event we will get the xmouse and ymouse and press string
//If event string is press, jump to new line(i.e. lineto(x,y))
//If event string is move, move with drawing(i.e. moveto(x,y))
}
This way , A shared whiteboard can easily be created.
To create a new Red5 application , follow my post here
Reference:-
Create whiteboard application with Flash communication server










