Source Code Page Comments.

Number of comments: 30

I tried the updated source code and I still cannot get to work. I have all of the directories in place with the correct names and correct files. I have Cold Fusion MX 6.1 Developer Edition installed on my PC. However I have not used this software much. Is anything in ColdFusion that I need to turn on when I log in it? I changed the username and password in .ASC file to match the username and password in the Server.XML which resides in the “conf” directory of Flash Communication Server MX.
In the middle of page 457 the RTMP has two forward slashes, I thought when you access the server locally on your computer (which is the case for me) it needs only one forward slash ( / ). On page 459 I noticed that the nc.connect( ) parameter is different then the source code. Which one should I use? When I have anything set up compile I just get “NetConnection.Connect.Success” with nothing in the List component. Should there be other trace statements that should appear during compile time? Thanks so much. : )

Posted by myIP Date: 2005-03-11 16:00:48.93

Hi myIP,

Have you enabled Flash Remoting in Coldfusion? Here is the URL on how to enable Remoting for Coldfusion 6.1 (if you haven't done it already):
(Note: Coldfusion 7 works differently.)

The listing on page 457 includes a connection to FlashCom's administrative server and is correct. The connect call is being made by the server-side application instance to the server's admin service on the same server. So the URI:

this.ncAdmin.connect("rtmp://localhost:1111/admin", "username", "password");

is fine.

You mentioned changing the username and password to what is in the server.xml file. That should be OK, if you put in the same username and password you use to log into the app_inspector. The password in the server.xml file is often encrypted. So don't cut and paste the encrypted text from the xml file into your code. (Sorry if that is alrready obvious to you.)

The connect call on page 459, rtmp://localhost/fcs_streams and the one in the book rtmp:/fcs_streams should do the same thing if you are testing everything on one system. That is if you are running the SWF on the same machine you are running FlashCom and Coldfusion. All the samples in the book assume that. However, if you are running a Webserver, Coldfusion, and FlashCom on a server and are testing your app from a separate machine you should go with the version in the book: rtmp:/fcs_streams. Even here I'm assuming the SWF is served from a web server on the same machine that is running FlashCom. (Again, sorry if this is all obvious.) Feel free to write me back directly at to let me know how it goes or if my note is not clear.

Note for other readers: this thread began on Ultrashock:

Yours truly,

Posted by Brian Lesser Date: 2005-03-12 09:38:22.943

Just an update for anyone reading this thread. myIP has the code working now. The last problem was that the default installation of Coldfusion sets up a web server at port 8500. The sample fcs_streams.asc file does not use port 8500 when connecting to Coldfusion's Flash Remoting gateway. To make the script work myIP had to change the following line in the fcs_streams.asc file from this:
to this:
Yours truly,

Posted by Brian Lesser Date: 2005-03-14 16:24:29.37

Awesome book! Thanks for all the insights and in-depth coverage. One request: I wonder if it would be possible to have some of the Cold Fusion translated to PHP. It would be great to see some examples using AMFPHP or similar technologies in addition to the CF samples.
Thanks again all the same,

Posted by Jim Duber Date: 2005-04-18 15:28:32.407

Thanks Jim,
Right now we don't have any plans to port code to PHP. If we do anything in PHP it will likely end up in a technote or two. Given how busy everyone is these days I don't know how likely that is though.
Thanks again,

Posted by Brian Lesser Date: 2005-04-18 17:19:21.587

Thank you for writing this book! Been looking for this kind of info on FlashCom for a long time. I am very interested in the PFCS component framework that is discussed in Chap15. You speak of a zip archive that contains the framework, but unable to find in source code in downloads...please advise where I can find it.

Posted by Dennis Miller Date: 2005-04-21 11:43:46.29

Hi Dennis,
Please download the cursors 496K zip file listed under chapter 17. I've been meaning to update some things in the pfcs components and post a better documented zip under chapter 15 but have not completed the work yet.
Yours truly,

Posted by Brian Lesser Date: 2005-04-21 11:53:08.873

The book is great, it making my project work. I have one question and cannot seem to find an answer for. Why do you use .prototype. - what is the signifigance of this and is it needed. Please explain, i cannot find any answers elsewhere.

Posted by muxx Date: 2005-05-14 02:30:53.43

Hi MuXx,
I guess the answer depends on if you are asking about client or server-side ActionScript. With server-side ActionScript you have to use .prototype to define classes. With client-side ActionScript in theory you don't need to use .prototype if you are using Flash MX 2004 or later. However, Macromedia has not updated their communication components to use class and extends or other ActionScript 2.0 features. Their code - written for Flash MX - uses .prototype to define each communication component's class. Also, many people have not made the transition to using ActionScript 2.0. So for client-side ActionScript I wanted to provide at least some examples of using ActionScript 1.0 to create classes. I thought it would help people who have not transitioned to AS 2 and people working with Macromedia's Communication Components. In the later chapters of the book I use class and extends a lot.
Yours truly,

Posted by Brian Lesser Date: 2005-05-14 10:09:24.333

I get this error when i try to publish the ticketAuthTestClient.fla after i have changed the URL for flash remoting.
**Error** Scene=Scene 1, layer=Script, frame=1:Line 13: The class 'mx.remoting.Service' could not be loaded.
authService = new Service(
**Error** Scene=Scene 1, layer=Script, frame=1:Line 18: The class 'mx.rpc.RelayResponder' could not be loaded.
new RelayResponder(this, "onAuthResult", "onAuthFault") );
Total ActionScript Errors: 2 Reported Errors: 2
Ive tried to make sure i have everything current, but i guess im missing somthing.
any help would be great. thks

Posted by asc Date: 2005-05-21 23:19:49.27

It sounds like the client-side Flash Remoting Classes have not been installed.
Have a look at these instructions to see if they help:
Yours truly,

Posted by Brian Lesser Date: 2005-05-22 10:51:38.787

Hi, your book is really filling a hole in flashcom documentation. I would only suggest to postpone chapter13 to 14th, because at the moment I feel you have not enough bases to jump immediately to chapter 13th code (only my opinion).
In my web server I cannot use Cold fusion for server authentication: could you kindly tell me if is there an object in ASS like LoadVariables in AS to manage data exchange with PHP, wich I am planning to use in my app?
Yours truly,

Posted by dax Date: 2005-05-31 03:59:55.86

Thanks Dax,
I never thought of reversing chapters 14 and 13. I'll have to look back at that. Regarding server authentication in PHP most people use AMFPHP. You can find information about it here:
Yours truly,

Posted by Brian Lesser Date: 2005-06-01 12:39:56.96

Typo on line 12 frame 1
writlen("Connected: " + this.isConnected);
should be
writeln("Connected: " + this.isConnected);

Posted by lonH Date: 2005-07-15 09:58:21.33

I think the line change below is needed:
function doCall(){
//"showMessage", null, "Thanks for all the fish."); null, "Thanks for all the");
Perhaps the original line is a SSAS syntax.

Posted by lonH Date: 2005-07-15 10:43:51.61

Hi Lon,
Thanks for taking the time to post. Yes, writlen is a typo and should be writeln.
However the syntax is correct. The call method sends a remote method call via the NetConnection object. The first parameter in quotes "showMessage" is the name of the method to call on the server.
Yours truly,

Posted by Brian Lesser Date: 2005-07-16 09:02:18.26

In Chapter 3 page 82, why is the NetConnection.onStatus event prototyped?

Posted by wasabi Date: 2005-09-19 14:25:05.857

Hi W,
I do that in a few places early in the book. I am trying to encourage you to put some sort of default onStatus on the prototype so you see all messages during development or while experimenting. The handler you put on the instance should be more specific for producction code.
Yours truly,

Posted by Brian Lesser Date: 2005-09-22 13:58:17.54

Great Book ! So glad this finally came out...but I have an issue and would like some insight if possible. I have a three player app and am using two seperate rooms. Each player uses a headset and I will have only two people in a room at one time. One player publishes an audio stream to that room for the other player in the room to play. This works fine except for one thing....because the player publishing the screen is connected to this room the play function causes the publishing player to play his own stream in his headset as well. Any information on how I might be able to designate the other person to be the only one to recieve the published stream would be greatly appreciated. thanks !

Posted by Danny Date: 2005-09-23 14:14:13.55

Hi all!
Sorry if this sounds petty, it probably is! I would have found it easier to download all the source files in a single zip and pick at them as I go, rather than have to keep unzipping them etc. - I know it's not a big thing - I love the book and it's really helping my current project come along.
Thanks and sorry for the pettiness of my post!! ;)

Posted by Jeff Date: 2005-10-01 15:01:00.32

Hi Jeff,
Not petty at all. Our problem is that all the authors were updating the archives as the book went to press - and still are with small changes. As a result the source files ended up in separate archives and it would be a huge task to reasamble everything outside of the archives and then zip it up into one. If we go forward with another editiion we might be able to make it easier to get everything at once.
Yours truly,

Posted by Brian Lesser Date: 2005-10-01 15:50:15.34

Hi Danny,
It's hard to diagnose something like that without seeing the code. If you can distil the code down to a small chunk and E-mail it to me ( ) I might be able to suggest something.
Yours truly,
.>because the player publishing the screen is connected to this room
>the play function causes the publishing player to play his own stream
>in his headset as well

Posted by Brian Lesser Date: 2005-10-01 15:53:55.01

I'm very interested in PFCS. I've tried FC Components in Thank you for writting. I used to work with ver 1 FlashCom Components: FCPresentationSWF, FCAVpresense, FCUsercolor. But they didn't work with AS2.0. Where can I find these components work in AS2.

Posted by VIIP Date: 2005-10-06 03:06:23.757

This book has been very helpful! I get the feeling that we (you, this list) are exploring territory that not many developers have gone before - is this all really new or have I been under a rock?
Anyway, I'm trying to get the messagetaker.fla to work. I've written a couple of apps so far with good success, including a simple live video conference app, running at high bandwidth. But this example doesn't seem to work. I've tried compiling it with Flash MX 2004 and Flash8.
It connects OK and when I record it shows the local camera and when I stop it shows the message in the list box, but when I select it and try to play it, it does nothing.
Any suggestions?

Posted by Billy Date: 2005-10-13 09:16:36.033

Macromedia did release an updated version of their communication components some time ago. You should still find them here:
They compile in Flash 7 but are still based on the initial V1 set of UI Components.
I am considering revamping the light-weight framework I made available with the book and adding additional components. However, it will be many months before I can do that.
Yours truly,

Posted by Brian Lesser Date: 2005-10-13 11:22:54.833

Found the problem with the message app. I've got the server running on a Linux AMD64 box and the application folder did not have the proper owner or rights. Sorry to bother you.

Posted by Billy Date: 2005-10-13 13:55:31.2

I've tryed your codes and I love them so much. I have some question about Flash Media Server. I haven't used FMS yet but FMS components in macromendia home page wasn't written in this way. I have some problem with the old FlashComm ComboBox components went trying UserColor Components in FlashMX2004 and FlashPlayer7. I got them while change the publish settings to Action Script 2.0 and FlashPlayer 7.
Why macromedia didn't make their Comunication with AS2?

Posted by VIIP Date: 2006-01-03 04:37:44.093

Macromedia/Adobe shifted the focus of the FCS/FMS server product from a more general purpose live/on-demand communications platform to more of a media delivery platform. They did a lot to improve the flv player and encoding available with Flash pro but have not done new work on the communication components. I guess – and I have no inside information – that most of the standalone FCS revenue they have seen has been for media delivery so they are basically following the money/market.
When FMS was released the license scheme provided unlimited bandwidth for only 100 simultaneous connections at $4,500. So if you were using FCS for lower bandwidth apps and needed 2500 users the server was suddenly unaffordable. As of this writing Adobe is working on providing better options for lower bandwidth applications so that 2500 users will cost $4,500 but with some sort of bandwidth cap.
Personally I believe, unless Adobe changes course, the continued high price for FMS will drive the market toward other solutions for real-time communications with Flash and that it is unlikely that Adobe will, on its own, continue development of the server as a more general purpose communications platform.
Yours truly,

Posted by Brian Lesser Date: 2006-01-03 12:31:41.823

I think it would be better if you have a step by step procedure on how to connect and the sharedObjects.
For example how to save certain variable to a SharedObjects and how to call that SharedObjects.

Posted by simon Date: 2006-07-28 04:51:18.06

Hi Brian,
God bless you and your co-author .. this' a beautiful work ... love it...

Posted by Joel Date: 2007-09-24 10:52:39.95