MACROMEDIA FLASH MEDIA SERVER 2-CLIENT-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR FLASH MEDIA SERVER 2 Instrukcja Użytkownika Strona 12

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 172
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 11
9
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
Example
The following server-side code accepts a client connection and traces the client ID:
application.onConnect = function(client){
// Accept the connection.
application.acceptConnection(client);
trace("connect: " + client.id);
};
Note: This example shows code from an application that does not use components.
application.allowDebug
application.allowDebug
A boolean value that lets administrators access an application with the Administration API approveDebugSession()
method (
true) or not (false). A debug connection lets administrators view information about shared objects and
streams in the Administration Console.
The default value for this property is false and is set in the Application.xml file:
<Application>
...
<Debug>
<AllowDebugDefault>false</AllowDebugDefault>
</Debug>
...
</Application>
Setting application.allowDebug to true in a server-side script overrides the value in the Application.xml file. To
view information in the Administration Console about the shared objects and streams in an application, add the
following line to your code:
application.allowDebug = true;
Availability
Flash Media Server 2
application.broadcastMsg()
application.broadcastMsg(cmd [, p1,..., pN])
Broadcasts a message to all clients connected to an application instance. To handle the message, the client must define
a handler on the NetConnection object with the same name as the
cmd parameter.
In ActionScript 2.0, define the method on the NetConnection object. In ActionScript 3.0, assign the
NetConnection.client property to an object on which callback methods are invoked. Define the method on that
object.
Availability
Flash Media Server 2
Parameters
cmd A string; the name of the a handler on the client-side NetConnection object.
p1,..., pN A string; messages to broadcast.
Przeglądanie stron 11
1 2 ... 7 8 9 10 11 12 13 14 15 16 17 ... 171 172

Komentarze do niniejszej Instrukcji

Brak uwag