User Guide

trace() 161
function onProcessCmd(cmd){
// Insert code here...
var streamSize = Stream.size("mp3:foo" );
trace("Size: " + streamSize + "\n");
}
Stream.syncWrite
Availability
Flash Media Server 2.
Usage
myStream.syncWrite
Description
Property; a Boolean value that controls when a stream writes the contents of the buffer to a
FLV file when the stream is recording. When
syncWrite is true, all the messages that pass
through the stream are flushed to the FLV file immediately. It is highly recommended that
user should only set
syncWrite to true in a stream that contains only data. Synchronization
problems might occur when
syncWrite is set to true in a stream that contains data and
audio, video, or both.
Example
The following example flushes data immediately to the FLV file:
// Assume foo is a data-only stream
application.myStream = Stream.get("foo");
if (application.myStream){
application.myStream.syncWrite = true;
application.myStream.record();
application.myStream.send("test", "hello world");
}
trace()
Availability
Flash Communication Server MX 1.0.
Usage
trace(expression)