Macromedia flash media server 2-client-side actionscript language reference for flash media server 2 ユーザーズマニュアル

ページ / 156
76
Client-Side ActionScript Language Reference
Usage
my_nc.uri
Description
Property (read-only); a string representing the target URI that was passed in with 
. If 
NetConnection.connect()
 hasn’t yet been called for 
my_nc
this property is undefined.
See also
NetStream class
Availability
Flash Player 6.
Flash Communication Server MX 1.0.
The NetStream class opens a one-way streaming connection between Flash Player and Flash 
Media Server through a connection made available by a NetConnection object. A NetStream 
object is like a channel inside a NetConnection object; this channel can either publish audio 
and/or video data, using 
, or subscribe to a published stream and 
receive data, using 
You can publish or play live (real-time) data and 
previously recorded data.
You can also use NetStream objects to send text messages to all subscribed clients (see 
The following steps summarize the sequence of actions required for publishing real-time 
audio and video using Flash Media Server and the Real-Time Messaging Protocol (RTMP):
1.
Use 
new NetConnection
 to create a NetConnection object.
2.
Use 
NetConnection.connect("rtmp://serverName/appName/appInstanceName")
 to 
connect the application instance to the Flash Media Server. 
3.
Use 
new NetStream(connection:String)
 to create a data stream over the connection.
4.
Use 
NetStream.attachAudio(audioSource:Microphone)
 to capture and send audio 
over the stream, and 
NetStream.attachVideo(videoSource:Camera)
 to capture and 
send video over the stream.
NO
TE
In Flash Player 7 and later, you can use this method to play FLV files without Flash 
Media Server. For more information, see the NetStream class entry in ActionScript 
2.0 Language Reference
.