I modified the XIFF-example a little bit too check Roster.length. This is always 1, also if I let another client join the chat. Can anybody help me? Here is the modified code:
I only modified this part:
// Room - CHANGE THESE SETTINGS
var chatRoom = new Room( connection );
chatRoster.dataProvider = chatRoom;
chatRoom.roomName = “flashroom”;
chatRoom.nickname = “flashclient”;
chatRoom.conferenceServer = “conference.192.168.1.23”;
var myRoster :Roster = new Roster(connection); // this has been modified
// Event handler
var eventHandler = new Object();
eventHandler.handleEvent = function( eventObj )
{
switch( eventObj.type )
{
case “outgoingData”:
trace( "SENT: " + eventObj.data );
break;
case “incomingData”:
trace( "RECEIVED: " + eventObj.data );
break;
case “login”:
// Connect to the conference server
myRoster.setPresence(null, “Online”, 5); // this has been modified
And this:
function addToChatOutput( nickname, text )
{
trace (“roster length=”+_root.myRoster.length); // this has been modified
if( nickname == chatRoom.nickname )
Message was edited by: dirkjan