NetConnection.connect()

Availability

Usage

Parameters

targetURI  For example, the following URIs are formatted correctly:

Returns

Description

Example

The following example opens a connection to play the video2.flv file. Select New Video from the Library options menu to create a new Video object, and give it the instance name my_video.

var connection_nc:NetConnection = new NetConnection();
connection_nc.connect(null);
var stream_ns:NetStream = new NetStream(connection_nc);
my_video.attachVideo(stream_ns);
stream_ns.play("video2.flv");

See also

NetConnection.close(), NetConnection.onStatus