sendPublicMessage()

Availability:

Flash Player 6.0
SmartFoxServer Lite / Basic / Pro

Usage:

smartFox.sendPublicMessage(msg, roomId)

Description:

Sends a public chat message to all users in the current room.

Parameters:

msg   A string with the text of the message
roomId   (optional) The id of the target room. By default the current roomId is used

Returns:

Fires the onPublicMessage event

Example:

smartFox.sendPublicMessage("Hello! This is my first public message!")

See also:

onPublicMessage, sendPrivateMessage()