PDA

View Full Version : help sending call to machine from FMS


Paul Ferrie
11-25-2007, 08:06 AM
Hi guys,
I was wondering if there was a better way of doing this.


I am working on a project when the user enters the site they are giving a unique ID which is used for FMS communication.
My problem is that i have setup up a little script that reads the user's mouse positions and then sends it to my machine with me being admin to the site. This is where my i think the code could be done better.

//send user mouse postion
Client.prototype.myMouse = function(X,Y,ID){
for (a = 0; a < application.clients.length; a++) {
if (application.clients[a].id == "Admin_0") {
application.clients[a].call("showMouse",null,X,Y,ID)
}
}
}
I am able to turn this function on and off but i think the coding could be better optimized. Is there a better way for the positions being sent to me without running for() on every occasion?
Thanks
Paul