How Flash Communication Server Works

[ LiB ]  

I like to say the Flash Communication Server (FCS) is one of Macromedia's coolest products ever. I've crammed nearly everything I know about it into Chapters 8 and 9, but you can certainly learn more. The primary goal of its inclusion in this book is to get you actually playing with itto learn the capabilities and to understand the way to approach a project using FCS. Here I want to give you just an overview of what it can do.

FCS is software that runs adjacent to your web server. You still place SWFs and HTML files in your standard web server, but inside your Flash movies you can include a script to connect to FCS. When a connection is made, users remain connected until they leave or you boot them off. This means not only can they send data directly to the FCS server, but the FCS server can send data to the users without the users first requesting it. This is true "push" technology as opposed to the standard "request and response" model. This persistent connection makes possible all kinds of applications, chat being the easiest to understand. One connected client can send a text message to the server, and it can relay that message to all connected users. In addition, if there's a user identified as Spanish, FCS could first translate that text to Spanish (via a web service) and then send it to that user, as Figure 3.9 shows. (And this is just a simple example.)

Figure 3.9. This real-time translating chat app was up and running in just over an hour .


Maintaining multiple persistently connected users is pretty cool. A nice added fact is the FCS is really efficient. You can build an app that only sends out notices to connected users with the actual data that changes. It's possible to make very-low-bandwidth usage appslower than most any app, not just other Flash apps.

The feature that gets the most airplay is support for live and recorded streaming media. This means that not only can users interact by typing or moving their mouse, but they also can speak into their computer's microphone or wave at their webcam and the pictures and sound are uploaded to FCS. That video feed can be saved for later playback as well as shared with any other connected user live. Besides simple video chat, the applications for education and business meetings are really great. There are actually other video chat solutions, but what makes FCS so cool is that it's all in Flash. That is, while the video is going you can also have an immersive Flash experience. With just a little creativity, you can make some powerful applications.

Here are a couple applications I built with FCS. I made what could be the first Flash answering machine for my web site (see Figure 3.10). You can leave a text, audio, or video messages as well as look at other messages people have left. In addition, if you leave your message marked private, only you (the person recording the message) and I can view or delete the message. I also built a real-time cattle auction for (shown in Chapter 1, "Replacing Web Pages with Applications"). Every couple of weeks, bidders enter a Flash movie that connects to FCS. It looks like a traditional sale barn, but all animated. The auctioneer announces the cattle and you've got plenty of details and images onscreen. Finally, when the bidding starts you see a clock countdown and every bid (as well as the state from where they came). If you turn off the motor-mouth auctioneer, it actually works great on slow modems! It's definitely the most involved FCS project I've done yet, and in retrospect it wasn't really that hard.

Figure 3.10. The answering machine on my web site was the first Communication Server app I built (


[ LiB ]  

Macromedia Flash MX 2004 for Rich Internet Applications
Macromedia Flash MX 2004 for Rich Internet Applications
ISBN: 0735713669
EAN: 2147483647
Year: 2002
Pages: 120 © 2008-2017.
If you may any questions please contact us: