
Chapter 120
Recreating the sample
This sample assumes you are using the Flash MX authoring environment on the computer that is
running the Flash Communication Server. If you aren’t, substitute your server URL for
“localhost” in the following steps. The sample also assumes that the service is running.
To create the user interface for this sample:
1 In the Flash authoring environment, select File > New to open a new file.
2 If the Library panel isn’t visible, select Window > Library to display it.
3 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.
4 Drag two embedded Video objects from the library onto the Stage and, in the Property
inspector, name them
Live_video and Published_video.
5 Resize the Published_video video object to 200 x 150.
6 If you haven’t already done so, create a directory named doc_connect in your flashcom
application directory. Save the file as doc_connect.fla in this directory. (By default, the
application directory is Flash Communication Server MX\flashcom\applications).
To write the ActionScript for this sample:
1 Select the keyframe (frame 1) in the Timeline and open the Actions panel (Window >
Actions).
Note: While re-creating the sample, make sure all of the ActionScript is attached to this first keyframe, and not to
the objects you create on the Stage.
2 Get the default camera and attach it to the Live_video embedded video object.
client_cam = Camera.get();
Live_video.attachVideo(client_cam);
Options menu
Commenti su questo manuale