crusader
06-25-2004, 04:26 PM
I have one more question on plugins.
I'm trying to send an object from the client to the server-side plugin in (an objects which contains the move that a player played on his turn)
and I want the plugin to forward it to the opponent and all spectators.
The problem is that I cannot receive properly the object the clients sends to the plugin.
The client uses this:
var parameters = {};
parameters.obj = object;
_root.es.pluginRequest (PluginName', 'Move', object);
And the plugin uses this:
function pluginRequest(hash) {
var user = hash.get("ExecutingUserName");
var method = hash.get("Method");
// Move received
if (method == "Move") {
var obj = Object(hash.get("obj"));
var arr = arrPlayers;
sendMove (obj, arr);
}
}
var obj = Object(hash.get("obj"));
This is the 'key' line in the whole thing. I guess I'm not using the get function properly and the object comes in as null.
Please, any suggestions?
I'm trying to send an object from the client to the server-side plugin in (an objects which contains the move that a player played on his turn)
and I want the plugin to forward it to the opponent and all spectators.
The problem is that I cannot receive properly the object the clients sends to the plugin.
The client uses this:
var parameters = {};
parameters.obj = object;
_root.es.pluginRequest (PluginName', 'Move', object);
And the plugin uses this:
function pluginRequest(hash) {
var user = hash.get("ExecutingUserName");
var method = hash.get("Method");
// Move received
if (method == "Move") {
var obj = Object(hash.get("obj"));
var arr = arrPlayers;
sendMove (obj, arr);
}
}
var obj = Object(hash.get("obj"));
This is the 'key' line in the whole thing. I guess I'm not using the get function properly and the object comes in as null.
Please, any suggestions?