The Stream object gives you control over all streams in the Application instance. This object lets you chain servers together to increase user and bandwidth capacity. It also allows you to create play lists, or control the source of any stream. A stream is a one-way flow of data over a NetConnection.
To enable Code Hints and Code Completion in Dreamweaver MX, use the suffix _stream in the name of the SharedObject variable.
The Stream methods are as follows:
Removes a recorded stream (FLV) file created by either the server or a client from the application instance.
Creates or references a stream by name. This method also insatiates the Stream object to your ActionScript variable.
|name||The name of the stream to create or access.|
Returns the length (in seconds) of a pre-recorded stream (FLV). You can use this method without the .get method to return the length of a pre-recorded stream that is not being accessed.
|name||The name of the FLV file (without the FLV extension).|
The Play command publishes a single recorded stream, or can publish a live stream from a local or remote source. Multiple play methods can be strung together to create a play list.
|streamName||The live or pre-recorded (FLV) stream to publish.|
|startTime||An integer referencing the playback start position in seconds.|
|length||An integer defining the length of play in seconds. A value of (-1) publishes a live stream as long as it exists.|
|reset||A Boolean value; when true, it resets the stream.|
|remoteConnection||Used to access streams in other application instances, or on remote communication servers. This can be used for "chaining" servers together.|
Records the stream to an FLV file. The contents of the stream are determined by a series of play methods. This stream can be used later for playback. The name of the FLV file is determined by the .get method.
|record (flag)||Overwrites any FLV file with the same name.|
|append (flag)||Appends any FLV file with the same name.|
|false (flag)||Stops recording.|
Used to broadcast a message to all subscribers of the stream. This method invokes functions defined in the stream instance on each subscribed client.
|handlerName||Call a custom function defined inside the stream (or NetStream) Object in client-side ActionScript.|
|p1, ..., pN||Custom parameters sent by the server to all stream subscribers.|
Allocates the amount of memory to handle pre-loading of a stream before publishing (playing). This command sends a message to the stream publisher source that the size has been changed.
|seconds||The amount of time to reserve for buffering.|
stream.buffertime returns the length of time in seconds that a stream will be stored before playing begins.
Stream.name returns the unique string used for a live stream.
Stream.onStatus invoked when the status of the subscribed stream changes.