sendModeratorMessage()

Availability:

Flash Player 7, 8
SmartFoxServer Basic / Pro (version 1.4.5+)

Usage:

smartFox.sendModeratorMessage(msg:String, type:Number, id:Number)

Description:

Sends a moderator message to an entire Zone, a Room or a single User.

Parameters:

msg   The message
type   You can use the following constants:

SmartFoxClient.MODMSG_TO_ZONE
SmartFoxClient.MODMSG_TO_ROOM
SmartFoxClient.MODMSG_TO_USER
id   the id of the recipient Room or User, ignored if you're sending the message to a Zone

Returns:

Fires the onPublicMessage event

Example:

/*
* Send message to all the clients in the currently active room
* NOTE: sfs is the name of the SmartFoxClient class instance
*/

smartFox.sendModeratorMessage("Greetings from the moderator", SmartFoxClient.MODMSG_TO_ROOM, sfs.getActiveRoom())

See also:

onModeratorMessage(), onAdminMessage()