Hi,
I'm stuck trying to get the userCollection into a list.
The flex docs say...
<mx:List dataProvider="{cSession.userManager.userCollection}"
but I'm not sure how to do it in flash.
Suggestions appreciated, thanks.
Graeme
Views
Replies
Total Likes
Looks like this does the trick...
var userArray:Array = session.userManager.userCollection.source;
var dp:DataProvider = new DataProvider();
for (var i in userArray)
{
dp.addItem({label:userArray[i].displayName});
}
uList.dataProvider = dp;
Not sure if it is the right approach, but I'll go with that unless anyone corrects me.
Thanks,
Graeme
Views
Replies
Total Likes
This works to give you the current status of the user list. If a user enter / exit the room, however, your DataProvider will not get updated.
You should attach an event listener to session.userManager.userCollection (or probably directly to userManager), and on the event handler add/remove items from the data provider.
Views
Replies
Total Likes
OK, that makes sense. Thanks for your help.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies