onUserVariablesUpdate()
Availability:
Flash Player 6.0
SmartFoxServer Lite / Basic / Pro
Usage:
smartFox.onUserVariablesUpdate(userObj)
Description:
The event is fired when a user in the current room updates its variables.
For more details about User objects please refer to the onUserEnterRoom event.
Parameters:
userObj | the object of the user who updated the variables |
Check the User Class for more info on the objects returned.
Returns:
nothing
Example:
smartFox.onUserVariablesUpdate = function(userObj) { // We assume each user has a px and py variable for moving an avatar icon around. var variables = userObj.getVariables() var px = variables["px"] var py = variables["py"] trace("User: " + userObj.getName() + " is now located at " + px + ", " + py) }
See also: