This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
72
|
Chapter 2: Communication Components
Building a Simple Chat Room
Now that you know how to connect to a FlashCom application using the Simple-
Connect and ConnectionLight components, you can proceed to add features to the
application. In the following steps, you will learn how to add the PeopleList, Chat,
and UserColor components to the basic_app application:
1. Open the component_connection.fla you created in the last section. Resave this
document as component_chat.fla.
2. Create a new layer named list_mc. On frame 1 of this layer, drag an instance of
the PeopleList component from the Components panel to the Stage. Name the
instance
list_mc using the Properties panel. Also, place this component near the
lower-left edge of the Stage, as shown in Figure 2-20.
3. Create another layer named chat_mc. On frame 1 of this layer, drag an instance
of the Chat component to the Stage. Name the instance
chat_mc using the Prop-
erties panel. Place this component to the right of the
list_mc instance, as shown
in Figure 2-21.
4. Create another layer named userColor_mc. On frame 1 of this layer, drag an
instance of the UserColor component to the Stage. Name the instance
userColor_mc using the Properties panel. Place this instance below the Simple-
Connect and ConnectionLight instances near the upper left of the Stage, as show
in Figure 2-22.
5. Select the
connect_mc instance on stage, and double-click its Communication
Components parameter in the Parameters tab of the Properties panel. In the
Values list, add the instance names of the three communication components—
list_mc, chat_mc, and userColor_mc—as shown in Figure 2-23.
Figure 2-20. The list_mc instance
Figure 2-21. The chat_mc instance
SimpleConnect instance
PeopleList instance
ConnectionLight instance
Chat instance

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.