Bonjour,
J'aimerais faire un chat et j'ai un probleme avec quelques fonctions.
Coté server, je crée le SO :
application.onAppStart = function() {
this.userList = SharedObject.get("public/userList");
this.chatSO = SharedObject.get("public/chatSO",true);
}
Ensuite, a la connexion du client j'envoie test a la fonction showMessage :
application.onConnect = function(client, objClient) {
//
this.acceptConnection(client);
//
client.readAccess = "public/";
client.writeAccess = "public/";
client.pseudo = objClient.pseudo;
//
this.userList.setProperty(objClient.pseudo, client);
this.chatSO.send("showMessage", "test");
}
Et coté client :
function init() {
// SO Chat
var chatSO = SharedObject.getRemote("public/chatSO", nc.uri, true);
chatSO.owner = this;
chatSO.connect(nc);
}
ensuite :
//affiche le msg
chatSO.showMessage = function(incmsg) {
trace("ee");
txt.text += "test"+incmsg;
};
Mais ça ne marche pas et je ne comprends pas pourquoi.
Sinon savez vous comment faire pour ne pas avoir à redemarrer le server pour qu'il prenne en compte les modifications du fichier ?
Merci de votre aide