This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
60
|
Chapter 2: Communication Components
the new updates, instructing them to change capture attributes of the Camera and/or
Microphone object.
The SetBandwidth component also sends these changes to the FlashCom applica-
tion. When the server-side FCSetBandwidth component receives updates, it invokes
Client.setBandwidthLimit( ) to restrict the bandwidth for streams managed by the
server. Note that this method controls both the bandwidth to the client from the
server and the bandwidth from the client to the server. The server changes override
any settings established by client-side ActionScript code.
SimpleConnect
The SimpleConnect component establishes the primary connection to a FlashCom
application from a Flash movie client. As you have undoubtedly gathered, other
communication components often use the connection established by the SimpleCon-
nect component to communicate with a FlashCom application. As its name implies,
this component is very simple to use from both authoring and runtime viewpoints.
At runtime, this component displays a username field and a Login button, as shown
in Figure 2-13.
The user types his name into the text field and clicks the Login button. When the
component successfully establishes a connection to the FlashCom application, it
passes its NetConnection object to other communication components (or your own
custom objects).
Nested Flash UI components
The SimpleConnect component uses the Flash MX UI component PushButton. You
can alter the look of this component by changing the appropriate skin symbol in the
Component Skins folder within the Flash document’s Library panel.
Client-side component parameters
An instance of the SimpleConnect component has two settings in the Properties
panel or Component Parameters panel:
Application Directory
The path of the FlashCom Server and application to which the component con-
nects. This value is an RTMP URI, starting with the string “rtmp:”. You can use
a relative RTMP URI that omits the server’s domain name if the FlashCom
Server coexists on the same IP address or domain as your web server. For exam-
ple, rtmp:/chat tells the SimpleConnect component to connect to the chat
Figure 2-13. The SimpleConnect component interface

Get Programming Flash Communication Server now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.