Using Communication Components > AVPresence component > Using the AVPresence component

 

Using the AVPresence component

This component is a versatile communication component and can be used to create a virtual presence for users. The following list describes two ways that you can use this component:

Panel discussions: A group of people can converse before an audience and create an ongoing debate or presentation.

Video phone: Using two of these AVPresence components in one application, you can create a video phone application.

 
To use the component in your application:

1

Make sure that Flash Communication Server is running.

2

Create a directory in the Flash Communication Server MX /application directory, avPresence_test.

3

Create a main.asc file in the avPresence_test directory with the following code:

load("components.asc");

Note: You can also copy the main.asc file from another application directory to this application's directory.

4

In Flash MX, drag the AVPresence component onto the Stage.

5

In the Property inspector, provide the following values:

Give the component an instance name, such as avPresence_mc.

For parameter definitions, see AVPresence component Property inspector.

6

Drag the SimpleConnect component onto the Stage to set up a connection to the Flash Communication Server.

7

In the Property inspector for the SimpleConnect component, provide the following two parameters:

In the Application Directory text box, type the URI of the application that you created in Step 2: rtmp:/AVPresence_test.

Double-click the Communication Components text box. In the Values dialog box that appears, click the plus sign (+), type the instance name of the AVPresence component (for example avPresence_mc), and click OK.

By providing this value, the SimpleConnect component handles the connection for the AVPresence component. When the SimpleConnect component successfully connects to the server, the AVPresence component automatically connects to the server.

8

Save and publish the file as myAVPresence.swf.

9

Open the SWF file. (Alternatively, select Control > Test Movie in the Flash MX authoring environment.) Log in and click the Send Audio/Video button.

If you have not previously set privacy settings for the Flash Player, you will be asked for permission to allow camera and audio access.

If your audio device is running, the audio level moves up when you speak. If your video device is running, you can see the output in the video display. Move your mouse pointer over the video display to see the UI for the microphone and camera as well as a button that lets you stop transmitting audio and video data.