v
Table of Contents
Foreword
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xi
Preface
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xv
Part I. FlashCom Foundation
1. Introducing the Flash Communication Server
. . . . . . . . . . . . . . . . . . . . . . . . . .
3
Clients and Servers 4
Creating an Application 6
Real-Time Messaging Protocol 7
The Communication Classes 9
Communicating with Application Servers, Databases, and Directory Servers 15
Firewalls and Security 16
Getting Started 16
Hello Video! 19
Conclusion 30
2. Communication Components
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
32
Overview of Communication Components 33
Summary of Communication Components 38
Creating an Application that Monitors a Connection 70
Building a Simple Chat Room 72
Adding Audio and Video to the Chat Room 73
Forgoing the SimpleConnect Component 75
Conclusion 76
vi | Table of Contents
3. Managing Connections
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
78
Making a Connection 78
Managing a Connection 84
Reusing a NetConnection Object 90
Multiple Simultaneous NetConnection Objects 93
Testing and Debugging Network Connections 93
Subclassing the NetConnection Class 96
Communication Components Without SimpleConnect 104
Conclusion 112
4. Applications, Instances, and Server-Side ActionScript
. . . . . . . . . . . . . . . . .
113
Scripting Application Instances 113
Differences Between Flash ActionScript and Server-Side ActionScript 118
The Life of an Application Instance 124
Running a Simple Hello World Test Script 126
A More Realistic Example 131
Instance-to-Instance Communications 138
Script Filenames and Locations in Detail 140
Testing and Debugging Server-Side Script Files 143
Designing Communication Applications 145
Conclusion 145
Part II. Audio, Video, and Data Streams
5. Managing Streams
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
149
A Simple Publisher/Subscriber Example 151
Stream Names 157
Publishing Streams in Detail 158
Playing Streams in Detail 166
The Stream Class 183
Publishing and Playing ActionScript Data 192
Creating Synchronized Presentations 197
The NetStream and Stream Information Objects 200
Stream Enhancements and Limitations 203
Conclusion 204
6. Microphone and Camera
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
206
Working with Microphone/Audio Input 206
Working with Camera Input 216

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.