Server-Side Communication ActionScript > Stream.record |
Stream.record
Availability
Flash Communication Server MX.
Usage
Stream.record(flag)
Parameters
flag This parameter can have the value record, append, or false. If the value is record, the data file is overwritten if it exists. If the value is append, the incoming data is appended to the end of the existing file. If the value is false, any previous recording stops. By default, the value is record.
Returns
A Boolean value of true if the recording succeeds, false otherwise.
Description
Method; records all the data going through a Stream object.
Example
This 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.
// To start recording
s = Stream.get("foo");
if (s){
s.play("sample");
s.record();
}
// To stop recording
s = Stream.get("foo");
if (s){
s.record(false);
}