onPublicMessage()

Availability:

Flash Player 6.0
SmartFoxServer Lite / Basic / Pro

Usage:

smartFox.onPublicMessage(msg, sender, sourceRoom)

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

Returns:

nothing

Example:

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

See also: