-
I have made a simple chat application (not using the pre-made components) and I have been trying to implement a private chat function, but I'm stuck!
If anyone can help me by giving me some simple guidance, I would greatly appreciate it
If u have an example app that has a private chat func to show me, please send this to:
mail@innernode.com
Thanxx :Þ
-
Hey -
I'm not sure how you have it setup but the idea is to use a different name for each "room's" shared object.
Something like so:
chat_so = SharedObject.getRemote("chat"+roomName,connection. uri, false);
where roomName is a variable defining the name of the room. Then you could have a listbox that changes the variable and connects to that room.
Ok..so for a private chat - you'd simply make it posible to type in the name of a room.
If that isn't quite what you're looking for, then I'm guessing you want a instant-message sort of deal? Where you'd click a user's name and then send a message to only that user?
For this, you'll send to modify your send function to pick out only the selected user and send the message only to that user. This is something I'm working on (alongside 6 million other things!) - but I'm adding it to the chat component.
Hope it helps! If not, post up more of what you want to do!
Psx
-
Thanx, PSX!
That helped me along the way. I now have a chat that implements a function where I can open a private chat room with a selected user from the user list. Now my problem lies in notifying the user I am messaging.
I've used a hidden movieclip for the private chat room, and this appears when u click on a name from my user list.
The problem is to get the reciever's private room mc to appear when it recieves a msg.. Can you help me here, too?
Another thing I was wondering about is if there is someway to set max users in the VideoConference component?
Thanx for taking the time :Þ
-
I am using the com_simcon sample from the components as a base and am trying to do the direct private chat.
If I use the 'rooms' route you previously discussed, what would be the best way using the PeopleList component?
and
How would I notify or bring up the private message in to the other user?
I am rather new to FCS and any help is appreciated!
-
Hi!
Sorry, but I've not yet tested it. But I will mail you when I do!
And if you find out a way to notify the user of å incoming private chat request, please tell me about it
-
I'm still working on it... slowed way down by the fact that my server has died! But I should be back up and running early this week. Hopefully that will speed things back up.
I'll post here or email you if I have any luck!
Psx
-
applications/chatroom/main.asc (server):
Code:
...
application.onConnect = function(newClient, password){
if(password="XXXXX"){ // replace XXXXX with the password for the lobby
application.acceptConnection(newClient);
} else {
application.rejectConnection(newClient, {id: 0, type: "Password", code: "Room.Passsword.Incorrect"});
}
}
...
client.fla (client):
Code:
...
nc = new NetConnection();
nc.connect("rtmp://server/chatroom/main", password_input_box.text);
nc.onStatus = function(info){
if(info.code == "NetConnection.Connect.Rejected"){
trace(info.application.code) // i THINK that's right... I'll double check when i get home. :\
}
if(info.code == "NetConnection.Connect.Connected"){
trace("Welcome to the private chat room!");
}
}
...
[Edited by Somar on 09-05-2002 at 03:40 PM]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|