Simple Call ordering users
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Macromedia Flash Server > Simple Call ordering users




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Simple Call ordering users  
Robert A Colvin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-27-05 10:45 PM

Hello all I am trying to understand how to get the following to work where I
 can connect to a specific user:
application.onConnect= function(newClient, username, userid, webcam,
level){
newClient.username = username;
newClient.userid = userid;
application.acceptConnection(newClient);
//not sure if I should call the client and get his username
newClient.call("getusername",applyusername(),userid);
//or is there a better way to do it?
}
applyusername.onResult = function(){
//append the username to a userid?
}
Client.prototype.specifyuser = function(message,user){

for (var i = 0; i<application.newClients.length;i++){
var c=application.newClients[i];
if (c.username ==user){
c.call("seemessage",null,message);
}
}
}



It would be nice if I can make a call directly to each specific client witho
ut sending the info to everyone.
on the client I would like to be able to simply do a call:


nc.call("specificuser",null,"hello you",user);



thanx for your help in advance


---------------------------------
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.

=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm






[ Post a follow-up to this message ]



    Re: Simple Call ordering users  
Jordan Snyder


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-27-05 10:45 PM

Create an array with userid as the key, like=20

clients[userid] =3D client

so that when someone wants to send a specific message, the client can call

nc.call("sendMessage', null, "Come get your TPS reports.", userID);

and the server code would be: =20

Client.prototype.sendMessage =3D function(msg, userID) {
clients[userID].call("receiveMessage", null, msg);
}




cheers
--=20
Jocrdan Snyder
Applications Developer
ImageAction, USA
http://www.imageaction.com

=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 07:11 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register