onPublicMessage()

Availability:

Flash Player 7, 8
SmartFoxServer Lite / Basic / Pro

Usage:

smartFox.onPublicMessage(msg:String, sender:User, sourceRoom:Number)

Description:

The event is fired when a public chat message is received.

Parameters:

msg   the text message
sender   the user object representing the client who sent the message
sourceRoom   the id of the room where the message was originated

Check the User Class for more info on the objects returned.

Returns:

nothing

Example:

smartFox.onPublicMessage = function(msg:String, sender:User)
{
	trace(sender.getName() + " said: " + msg) 
}

See also: