Hi,
this is the code where I'm trying to use an icon in the iconfield in my userlist but I'm getting a number back for the user.getId(), not the user's name. The icon is there.Code:smartfox.onJoinRoom = function(roomObj:Room) { var userList:Object = roomObj.getUserList(); chat_txt.htmlText = ""; userList_lb.removeAll(); for (var i in userList) { var user:User = userList[i]; userList_lb.addItem({icon:"sDona", data:user.getName(), label:user.getId()}); } userList_lb.iconField = "icon"; userList_lb.sortItemsBy("label", "ASC"); };
How should I approach this? I'd like to add different icons depending on the user's gender.




Reply With Quote