onUserVariablesUpdate()
Availability:
Flash Player 7, 8
SmartFoxServer Lite / Basic / Pro
Usage:
smartFox.onUserVariablesUpdate(userObj:User, changedVars:Array)
Description:
The event is fired when a user in the current room updates its variables.
Parameters:
userObj | the object of the user who updated the variables | |
changedVars | An associative array with the names of the changed variables as keys Also you can iterate through numeric indexes (0 to length) to get the names of the variables that were changed. |
Returns:
nothing
Example:
smartFox.onUserVariablesUpdate = function(userObj:User) { // We assume each user has a px and py variable for moving an avatar icon around. var variables:Object = userObj.getVariables() var px:Number = variables["px"] var py:Number = variables["py"] trace("User: " + userObj.getName() + " is now located at " + px + ", " + py) }
See also: