onBuddyListUpdate()
Availability:
Flash Player 6.0
SmartFoxServer Basic / Pro
Usage:
smartFox.onBuddyListUpdate(buddy)
Description:
The event is fired when the status of one buddy in the buddy list changes. (For example the buddy was previously offline and now is online)
Parameters:
| buddy | An object representing the buddy that has changed status |
| id | buddy id | |
| name | buddy name | |
| isOnline | a boolean value. True if the buddy is currently online | |
| variables | an object with extra properties of the buddy |
Returns:
nothing
Example:
In the example we show the status of the buddy that has been updated and we cycle through all its Buddy Variables
smartFox.onBuddyListUpdate = function(buddy:Object)
{
var name:String = buddy.name
var status:String = "offline"
if (buddy.isOnline)
status = "online"
trace("Buddy " + name + " is currently " + status)
// trace all buddy variables
for (var i:String in buddy.variables)
trace("Property: " + i + " => " + buddy.variables[i]
}
See also:
onBuddyList(), onBuddyListError(), onBuddyRoom()