03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

setBufferTime (NetStream.setBufferTime method)<br />

public setBufferTime(bufferTime:Number) : Void<br />

Specifies how long to buffer messages before starting to display the stream. For example, if<br />

you want to make sure that the first 15 seconds of the stream play without interruption, set<br />

bufferTime to 15; Flash begins playing the stream only after 15 seconds of data are buffered.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 7 - Note: This method is also supported in Flash<br />

Player 6 when used with Flash Media Server. For more information, see the Flash Media<br />

Server documentation.<br />

Parameters<br />

bufferTime:Number - The number of seconds of data to be buffered before Flash begins<br />

displaying data. The default value is 0.1 (one-tenth of a second).<br />

Example<br />

See the example for NetStream.bufferLength.<br />

See also<br />

bufferLength (NetStream.bufferLength property), bufferTime<br />

(NetStream.bufferTime property)<br />

time (NetStream.time property)<br />

public time : Number [read-only]<br />

The position of the playhead, in seconds.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 7 - Note: This property is also supported in Flash<br />

Player 6 when used with Flash Media Server. For more information, see the Flash Media<br />

Server documentation.<br />

Example<br />

The following example displays the current position of the playhead in a dynamically created<br />

text field called time_txt. Select New Video from the Library options menu to create a video<br />

object instance, <strong>and</strong> give it an instance name my_video. Create a new video object called<br />

my_video. Add the following <strong>ActionScript</strong> to your FLA or AS file:<br />

var connection_nc:NetConnection = new NetConnection();<br />

connection_nc.connect(null);<br />

var stream_ns:NetStream = new NetStream(connection_nc);<br />

my_video.attachVideo(stream_ns);<br />

stream_ns.play("video1.flv");<br />

NetStream 997

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!