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.
NO
TE
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
.
Содержание FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT...
Страница 1: ...Server Side ActionScript Language Reference...
Страница 4: ...4 Contents...
Страница 228: ...228 Server Side ActionScript Language Reference...
Страница 234: ...234 Server Side Information Objects...