MACROMEDIA FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE Reference page 19

Server-side actionscript language reference
Table of Contents

Advertisement

Description
Property; a Boolean value that allows Administrators to access your application with the
Server Management API (
) or not (
). A debug
approveDebugSession()
true
false
connection displays information about shared objects and streams.
For information about creating a debug connection, see
and
NetConnection.connect()
.
approveDebugSession()
Application.broadcastMsg()
Availability
Flash Media Server 2.
Usage
application.broadcastMsg(cmd [, p1, p2, ..., pN])
Parameters
A string; a message to broadcast.
cmd
A string; additional messages.
p1
Returns
Nothing.
Description
Method; broadcasts a message to all connected clients.
This method is equivalent to looping through the
array and calling
Application.clients
on each individual client, but is more efficient (especially for large number of
Client.call()
connected clients). The only difference is that you can't specify a response object when you
call
, otherwise, the syntax is the same.
broadcastMsg()
Shared objects can handle broadcast messages with the
SharedObject.handlerName
property.
Example
The following server-side code sends a message to the client:
application.broadcastMsg("handlerName", "Hello World");
The following client-side code catches the message and prints it in the Output panel:
nc = new NetConnection();
nc.handlerName = function(msg) { trace(msg); }
// traces out "Hello World"
Application class
19

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash media server 2

Table of Contents