User Guide
156 Server-Side ActionScript Language Reference
Example
The following example opens a stream s and, when it is open, plays sample and records it.
Because no value is passed to the
record method, the default value, record, is passed.
// Start recording.
s = Stream.get("foo");
if (s){
s.play("sample");
s.record();
}
// Stop recording.
s = Stream.get("foo");
if (s){
s.record(false);
}
Stream.send()
Availability
Flash Communication Server MX 1.0.
Usage
myStream.send(handlerName, [p1, ..., pN])
Parameters
handlerName Calls the specified handler in client-side ActionScript code. The
handlerName value is the name of a method relative to the subscribing Stream object. For
example, if
handlerName is doSomething, the doSomething method at the stream level is
invoked with all the
p1, ..., pN parameters. Unlike the method names in Client.call()
and
NetConnection.call(), the handler name can be only one level deep (that is, it cannot
have the form of
object/method).
p1, ..., pN Parameters of any ActionScript type, including references to other
ActionScript objects. These parameters are passed to the specified handler when it is executed
on the Flash client.
Returns
A Boolean value of true if the message was sent to the client; false otherwise.
NOTE
Do not use a built-in method name for a handler name. For example, the subscribing
stream will close if the handler name is
close.