NetStream.close()

Availability

Usage

public close() : Void

Parameters

None.

Returns

Nothing.

Description

Method; stops publishing or playing all data on the stream, sets the NetStream.time property to 0, and makes the stream available for another use. This method is invoked implicitly whenever you call NetStream.play() from a publishing stream, or NetStream.publish() from a subscribing stream.

Example

The following onDisconnect() function closes a stream:

function onDisconnect() {

    // Stops publishing the stream.
    srcStream_ns.close();
    
    /* Deletes the source stream connection. With no source to play, the destination stream also ends and can be deleted. */
    my_nc.close();
}

See also

NetStream.pause(), NetStream.play(), NetStream.publish(), NetStream.time


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/fms/2/docs/00000580.html