03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - 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.

close (NetStream.setBufferTime) method<br />

public close() : Void<br />

Stops playing all data on the stream, sets the NetStream.time property to 0, <strong>and</strong> makes the<br />

stream available for another use. This comm<strong>and</strong> also deletes the local copy of an FLV file that<br />

was downloaded using HTTP. Although Flash Player deletes the local copy of the FLV file<br />

that it creates, a copy of the video may persist in the browser's cache directory. If complete<br />

prevention of caching or local storage of the FLV file is required, use Flash Media Server.<br />

Availability<br />

ActionScript 1.0; Flash Player 7<br />

NOTE: This method is also supported in Flash Player 6 when used with Flash Media<br />

Server. For more information, see the Flash Media Server documentation.<br />

Example<br />

The following close() function closes a connection <strong>and</strong> deletes the temporary copy of<br />

video1.flv that was stored on the local disk when you click the button called close_btn:<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 />

close_btn.onRelease = function(){<br />

stream_ns.close();<br />

};<br />

pause (NetStream.pause) method<br />

public pause([flag:Boolean]) : Void<br />

Pauses or resumes playback of a stream.<br />

The first time you call this method (without sending a parameter), it pauses play; the next<br />

time, it resumes play. You might want to attach this method to a button that the user presses<br />

to pause or resume playback.<br />

Availability<br />

ActionScript 1.0; Flash Player 7<br />

NOTE: This method is also supported in Flash Player 6 when used with Flash Media<br />

Server. For more information, see the Flash Media Server documentation.<br />

510 ActionScript classes

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

Saved successfully!

Ooh no, something went wrong!