Flash Media Server |
|||
| Client-Side ActionScript Language Reference for Flash Media Server 2 > Client-Side ActionScript Language Reference > NetConnection class > NetConnection.connect() | |||
targetURI For example, the following URIs are formatted correctly:
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");
NetConnection.close(), NetConnection.onStatus