The NetStream class creates a stream that can be used for playing FLV files through the specified NetConnection object.
Local file URLs are also supported by simply replacing "http:" with "file:" For example:
NetStream.play("http://somefile.flv");
NetStream.play("file://somefile.flv");
Flash Lite 3.0 supports all of the methods, properties and events documented in the ActionScript 2.0 Language Reference, with the exception of the checkPolicyFile property, which Flash Lite does not support. The supported methods, properties and events are briefly described below. See the Flash Lite 2.x and 3.0 Language Reference for complete descriptions.
NetStream Class methods
- close(): Stops playing all data on the stream, and sets the time property to 0.
- pause(): Pauses or resumes playback of a stream.
- play(): Begins playback of an external video (FLV) file.
- seek(): Seeks the keyframe closest to the specified number of seconds from the beginning of the stream.
- setBufferTime(): Specifies how long to buffer messages before starting to display.
NetStream Class properties
- bufferLength: The number of seconds of data currently in the buffer.
- bufferTime: The number of seconds assigned to the buffer by setBufferTime().
- bytesLoaded: The number of bytes of data that have been loaded into the player.
- bytesTotal: The total size in bytes of the file being loaded into the player.
- currentFPS: The number of frames per second being displayed.
- time: The position of the playhead, in seconds.
NetStream Class events
- onStatus: Invoked when a status change or error is posted for the NetStream object.
- onCuePoint: Invoked when an embedded cue point is reached while playing an FLV file.
- onMetaData: Invoked when the Flash Player receives descriptive information embedded in the FLV file.