MACROMEDIA FLASH MEDIA SERVER 2-SERVER MANAGEMENT ACTIONSCRIPT LANGUAGE Manuale Utente Pagina 81

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 155
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 80
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
78
ns.attach(myStream);
ns.publish(myStream.name, "live");
};
NetStream.send()
ns.send(handlerName, [p1, ..., pN])
Broadcasts a data message over a stream.
Availability
Flash Media Interactive Server 3 and Flash Media Development Server 3
Parameters
handlerName A string that identifies the name of the handler to receive the message.
p1, ..., pN Optional parameters of any type. They are serialized and sent over the connection. The receiving
handler receives them in the same order.
Returns
A boolean value;
true if the data message is dispatched; otherwise, false.
Example
The following client-side code broadcasts the message “
Hello world” to the foo handler function on each client
that is connected to
myApp:
nc = new NetConnection();
nc.connect("rtmp://xyz.com/myApp");
ns = new NetStream(nc);
ns.send("foo", "Hello world");
NetStream.setBufferTime()
ns.setBufferTime(bufferTime)
Sets the size of the outgoing buffer in seconds. If publishing, it controls the buffer in the local server.
Availability
Flash Media Interactive Server 3 and Flash Media Development Server 3
Parameters
bufferTime A number indicating the size of the outgoing buffer in seconds.
Example
nc = new NetConnection();
nc.connect("rtmp://xyz.com/myApp");
ns = new NetStream(nc);
ns.setBufferTime(2);
NetStream.time
ns.time
Read-only; indicates the number of seconds the stream has been publishing. This is a good indication of whether
data is flowing from the source that has been set in a call to the
NetStream.attach() method.
Vedere la pagina 80
1 2 ... 76 77 78 79 80 81 82 83 84 85 86 ... 154 155

Commenti su questo manuale

Nessun commento