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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

■ You can prevent a SWF file from using this method by setting the allowNetworking<br />

parameter of the the object <strong>and</strong> embed tags in the HTML page that contains the SWF<br />

content.<br />

close (NetConnection.close method)<br />

public function close():void<br />

Closes the connection that was opened locally or with the server <strong>and</strong> dispatches the<br />

netStatus event with a code property of NetConnection.Connect.Closed.<br />

This method disconnects all NetStream objects running over this connection; any queued<br />

data that has not been sent is discarded. (To terminate streams without closing the<br />

connection, use NetStream.close().) If you call this method <strong>and</strong> then want to reconnect,<br />

you must recreate the NetStream object.<br />

See also<br />

NetStream<br />

NetStream<br />

Creates a stream that can be used for playing FLV files through the specified NetConnection<br />

object.<br />

Local file URLs are also supported by simply replacing “http:” with “file:” For example:<br />

NetStream.play("http://somefile.flv");<br />

NetStream.play("file://somefile.flv");<br />

NOTE<br />

St<strong>and</strong>ard security restrictions apply. For example a remote SWF file cannot access<br />

absolute file:// URLs in the form of "file://C:/somefile.flv".<br />

NetStream Class methods<br />

Method Description<br />

close() close():void<br />

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

makes the stream available for another use.<br />

pause() pause():void<br />

Pauses playback of a video stream.<br />

play() play(... arguments):void<br />

Begins playback of external audio or a video (FLV) file.<br />

NetStream 497

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

Saved successfully!

Ooh no, something went wrong!