User Guide
Stream class 147
Example
The following example deletes a recorded stream called foo.flv. Before the stream is deleted,
the example defines an
onStatus handler that uses two information object error codes,
NetStream.Clear.Success and NetStream.Clear.Failed, to send status messages to the
application log file and Application inspector.
s = Stream.get("foo");
if (s){
s.onStatus = function(info){
if(info.code == "NetStream.Clear.Success"){
trace("Stream cleared successfully.");
}
if(info.code == "NetStream.Clear.Failed"){
trace("Failed to clear stream.");
}
};
s.clear();
}
See also
Stream.get()
Stream.flush()
Availability
Flash Media Server 2.
Usage
myStream.flush()
Parameters
None.
Returns
A Boolean value of true if the buffer was successfully flushed; false otherwise.
Description
Method; flushes a stream. If the stream is used for recording, the flush() method writes the
the contents of the buffer associated with the stream to the FLV file.
NOTE
The Stream information object is nearly identical to the client-side ActionScript
NetStream information object. For more information, see “Server-Side Information
Objects” on page 229.