onObjectReceived()
Availability:
Flash Player 7, 8
SmartFoxServer Lite / Basic / Pro
Usage:
smartFox.onObjectReceived(obj:Object, sender:User)
Description:
The event is fired when an Actionscript object is received. (object can be sent with the sendObject() method)
Parameters:
obj | The actionscript object | |
sender | The user object representing the client who sent the data |
Check the User Class for more info on the objects returned.
Returns:
nothing
Example:
smartFox.onObjectReceived = function(obj:Object, sender:User) { // Assuming another client has sent his X and Y positions // in two properties called px, py trace("Got data from: " + sender.getName()) trace("X = " + obj.px + ", Y = " + obj.py) }
See also: