Shared Whiteboard application in Red5
var whiteboard_SO:SharedObject = SharedObject।getRemote(”whiteboard”,nc.uri,”false”);
Quand nous pressons la souris sur un MovieClip, nous capturons les positions x et y de la souris et nous les envoyons vers le serveur:
//envoyer x et y au serveur
};
clip_MC.onMouseMove = function(){
//envoyer x et y au serveur
NetConnectionObj.call(”draw”, null,param1, param2,param3);
}
Sur le serveur,
public void draw(Object[] params){
whiteboard_SO.setAttribute(”point”,params[0].toString()+”:”+params[1].toString()+”:”+params[2].toString());
// va etre declanché sur l’evenement onSync sur tous les clients connectés
}
Enfin sur la partie client
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))
}
TRADUIT de http://sunil-gupta.blogspot.com/2007/04/shared-whiteboard-application-in-red5.html
0 Responses to “Linux : executer un script au demarrage”
Leave a Reply