This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Real-Time Messaging Protocol
|
7
Creating an application to do anything more complex than video-on-demand
requires some level of Flash authoring. Unless stated otherwise, when I refer to Flash,
I mean the Flash authoring tool, such as Flash MX 2004 or Flash MX Professional
2004 (Flash Pro). If you are not familiar with authoring in Flash, see Flash Out of the
Box (O’Reilly), which is an excellent introduction to the authoring tool.
You can create simple communication applications—such as a video conferencing
application—using prebuilt components such as the SimpleConnect, PeopleList, and
VideoConference components supplied by Macromedia. You can drag the compo-
nents from Flash’s Components panel to the Stage to construct the user interface.
Using Flash’s Properties panel, you can configure the components to work together
and supply them with the address of the application instance on a FlashCom Server
to connect to. Chapter 2 describes working with Macromedia’s communication com-
ponents in this way.
For more diverse applications, you must use ActionScript to create or customize
components and build unique user interfaces. Chapters 13 through 15 describe how
to extend the existing components or roll your own. Existing communication-related
ActionScript classes make developing custom components and applications much
easier. On the client side, they include the NetConnection, NetStream, Camera,
SharedObject, and Microphone classes. Server-Side ActionScript classes include the
Application, Client, Stream, and SharedObject classes. We’ll cover these classes and
their methods throughout the remainder of the book.
Real-Time Messaging Protocol
The Flash Player communicates with FlashCom using Macromedia’s proprietary
Real-Time Messaging Protocol (RTMP). RTMP uses TCP (transmission control pro-
tocol) for transmission of packets between the Flash Player and the server. TCP is a
reliable protocol that guarantees delivery of every packet of information. RTMP can
transport audio encoded in MP3 and Nellymoser (http://www.nellymoser.com) for-
mats, video encoded in the Flash Video format (FLV), and data encoded using Mac-
romedia’s Action Message Format (AMF). AMF provides an efficient way to
serialize/deserialize data so that both primitive and complex ActionScript data can be
transferred between client and server without needing to manually encode or decode
the data. AMF is briefly described in Chapter 11, but for full details, see Flash Remot-
ing: The Definitive Guide (O’Reilly).
FlashCom Versus Traditional Media Servers
Using TCP as the foundation protocol for Flash communications simplifies manag-
ing the transfer of audio, video, and ActionScript data flowing between the client and
server. However, TCP is a point-to-point protocol, which means each client requires
a separate client/server TCP connection; consequently, it cannot broadcast or

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.