public close() : Void
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.
- If this method is called from a publishing stream, all pending NetStream.play() calls on the stream are cleared on the server; subscribers no longer receive anything that was being published on the stream.
- If this method is called from a subscribing stream, publishing continues and other subscribing streams may still be playing, but the subscriber can now use the stream for another purpose.
- To stop play on a subscribing stream without closing the stream or changing the stream type, use my_ns.play(false).
Availability
Flash Communication Server 1.0; Flash Player 6.
Example
The following code closes a stream:
// Stops publishing the stream.
srcStream_ns.close();
// Deletes the source stream connection.
my_nc.close();