onBuddyListUpdate()
Availability:
Flash Player 7, 8
SmartFoxServer Basic / Pro
Usage:
smartFox.onBuddyListUpdate(buddy:Object)
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 onlie | |
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()