Using Communication Objects > Flash Communication Server objects > Client-side objects

 

Client-side objects

These objects are used only in client-side ActionScript. For more information about these objects, see the Client-Side Communication ActionScript Dictionary.

Camera object The client-side Camera object lets you capture video from a video camera attached to any computer running Macromedia Flash Player. When used with the Flash Communication Server, this object lets you transmit, display, and optionally record the video being captured. With these capabilities, you can develop communication applications such as videoconferencing, instant messaging with video, and so on.

Microphone object The client-side Microphone object lets you capture audio from a microphone attached to any computer running Flash Player. When used with the Flash Communication Server, this object lets you transmit, play, and optionally record the audio being captured. With these capabilities, you can develop communication applications such as instant messaging with audio, recording presentations so others can replay them at a later date, and so on.

You can also use a Microphone object without a server—for example, to transmit sound from your microphone through the speakers on your local system.

NetConnection object The client-side NetConnection object allows the Flash client to open a TCP socket on the Flash Communication Server for continuous exchange of data using the Real-Time Messaging Protocol (RTMP). You can also use the NetConnection object to connect to an application server (see Connecting through Flash Remoting), but this document focuses on using the NetConnection object to communicate with the Flash Communication Server.

NetStream object The client-side NetStream object opens a one-way streaming connection between the Flash Player and the Flash Communication Server through a connection made available by a client-side NetConnection object. A NetStream object is like a channel inside a NetConnection; this channel can either publish audio, video, and data, using the NetStream.publish method, or subscribe to a stream and receive data, using the NetStream.play method. You can publish or play live (real-time) data and play previously recorded data. Multiple clients can play a given stream, but a stream can have only one publisher at a time. For information about the creation and storage of recorded streams on the server, see Recorded stream files.

Local shared object Client-side local shared objects let you store information on a user's computer, such as the high score in a game, that can be used later by the same application or by a different application running on that computer. For more information about local shared objects, see Understanding shared objects.

Video object The client-side Video object lets you display streaming video on the Stage. To display a video feed being played or captured through the use of a NetStream.play or Camera.get command, place a Video object on the Stage and use the Video.attachVideo method to attach the feed to the object.

 
To place a Video object on the Stage:

1

If the Library panel isn't visible, select Window > Library to display it.

2

Add an embedded Video object to the library by clicking the Options menu at the upper right of the Library panel and choosing New Video.

3

Drag the Video object to the Stage and use the Property inspector to give it a unique name.