January 31, 2006

A great review of streaming server options

From Mike Downey's blog actually, this long article on Network Computing goes into great depth on the results of testing Flash Media Server2, Real's Helix, Microsoft Media Server and Apple's Darwin.

Definitely a good read if you are into streaming video on the web and are interested in understanding what other options there are out there.

Posted by Graeme at 05:06 PM | Comments (0)

January 28, 2006

Ask an FMS Guru #1: How do I use the File Object on the server side with FMS2?

Got a question here for the FMS Guru on "How do I use the file object on the server side with FMS2?"

So here's an answer :)

The file object on the server is actually quite powerful. Up until FMS2.0 there was no way to get a list of files, or write or read files directly from FCS. A lot of people wanted to be able to do this to get a list of FLV files, or MP3 files or something on the server that FCS was on. Most would use remoting and take advantage of PHP or Coldfusion to read a list and pass it back as an array perhaps. A pain.. that's for sure.

With the new file object API it's now possible to do quite a few things including getting lists of files, reading files and writing to them.

For an answer to the question, we are going to look at an example of writing a "login log" text file for every user that logs into a particular application.

First off we need to connect up to an application on FMS. So here is some basic client side code:


//create the netconnection object
var nc:NetConnection = new NetConnection();

//for the time being, stick in the onStatus
nc.onStatus = function(info){
      trace(info.code);
}

//connect up and pass in the username
nc.connect("rtmp:/file_object", "Graeme"); 
)

Now that is pretty simple, we're going to connect up to an application called "file_object" and pass in the username "Graeme".

On to the server side:


//setup the function that gets called when the client connects up
application.onConnect = function(clientObj, userName){
      //we're getting the client object and the userName that is passed in
      //make sure that the userName value exists, we're going to use it for the filename
      if(userName != undefined){
            //accept the connection for now
            application.acceptConnection(clientObj);
            //create the file object here
            var fileObj = new File(userName + ".txt");
            //check to see if the file actually exists already
            if(fileObj.exists){
                  //if so, then open the file with the mode "text" for text file, and "append" because we are going to add to it
                  fileObj.open("text", "append")
             }else{
                  //if not, then create it with the mode "create"
                  fileObj.open("text", "create");
             }
            //here is where we write in the text file
            fileObj.writeln(userName + " logged in on " + new Date());
            //and close up the file
            fileObj.close();
       }else{
            //no username, so reject them
            application.rejectConnection(clientObj);
       }
}

Now you save that code in your main.asc file, put it in the application folder and connect up. On the connect you should now see a brand new text file in the application directory with the user's username as the file name, and when they logged in. Log in more than once with the same user and it will add another line.

This method can be used for all kinds of things I think. Logging users in, logging views of a video etc etc.

I hope this helps understand one small part of the file object on the server side of FMS2.0.

Posted by Graeme at 04:52 PM | Comments (0)

January 26, 2006

Adobe releases Adobe Acrobat3D

Adobe has released Adobe Acrobat3D for easing collaboration when working with 3D (CAD) data. The gist of it is you get a PDF with an interactive 3D data viewer (rotate, zoom, etc). Pretty cool stuff. It currently seems to be aimed at the manufacturing sector, but I hope that at some point it becomes a standard export format for a number of design/modeling applications, as it would make the proofing/review process so much easier when dealing with clients.

View a sample file with embedded 3D (PDF: 2.8M)

More info at the Adobe site.

Posted by Kris at 12:09 AM | Comments (0)

January 19, 2006

Ask an FMS2.0 Guru

I was just wandering over MXNA and it occured to me that there are a few guru's out there that field questions for Flash and Coldfusion etc, but how about Flash Media Server (formerly Flash Communication Server).

So, I'd like to maybe take on some questions as a self-proclaimed FMS2.0 Guru :D

If you have any questions about FMS2.0 or 1.5 for that matter, please feel free to send them off in the comments or email me at fmsguru [at] solid-thinking.com. I'll post answers here on my blog for all to view as soon as I can answer them.

Posted by Graeme at 08:58 AM | Comments (0)

January 18, 2006

Multiplayer Chess with Flash Media Server

Along with the checkers game that we put up the other day, we've decided to stick up our multiplayer chess game that we made with FMS2.0 and Flash 8 (3D graphics are done in Swift3D v4.5, with photoshop) for people to play for free when bored :)

Check it out here

You can now go in the "challenge lobby", wait for somebody to join up and then challenge them to a game. This is a bit better than before with the requirement of sending somebody a link to join the room.

Posted by Graeme at 03:47 PM | Comments (0)

I'm speaking at webdu 2006 on: Tips and Tricks and Good Practices For FMS2.0

Yup, for a second year in a row I'm lucky enough to be speaking in Australia at the famed and most awesome conference webdu2006 (formerly known as MXDU). I've been to quite a few conferences (mainly Macromedia's MAX) and even though there has been some seriously nice stuff going on, nothing yet has topped my experience last year at MXDU 2005 when I spoke on Flash Video. This conference truly rules!

Anyhow..

My session is going to be on FMS 2.0, I'll be talking about Tips and Tricks and Good Practices For Building Flash Media Server 2.0 Applications, which should be lotsa fun. I'm looking forward to see how much interest there is in FMS2.0 down under and hopefully meeting/catching up with lots of peeps that I've been speaking with for the last couple of years.

Here's a direct link to the session details:

http://www.webdu.com.au/go/session/flash-media-server

Posted by Graeme at 08:00 AM | Comments (0)

January 17, 2006

Multiplayer Checkers with Flash Media Server

We've decided to stick up our multiplayer checkers game that we made with FMS2.0 and Flash 8 (3D graphics are done in Swift3D v4.5, with photoshop) for people to play for free when bored :)

Like lunch hour perhaps?

Check it out here

We should have a couple more games coming up soon, I'll post them as we get them going.

Posted by Graeme at 07:49 AM | Comments (0)

January 07, 2006

A new resource for Flash Media Server 2

Just wanted to quickly note a new resource from a smart FMS guy named Darren (Daz). He runs fczone.com (Flash Media Server Fun) where he's gone and posted a whole bunch of free stuff.

Like Stefan of flashcomguru, I've got my eyes on the video guestmap ;)

Posted by Graeme at 08:03 AM | Comments (0)

January 05, 2006

AspUpload gets patched for Flash 8 File Upload implementation (Flash Player has a bug?)

This may be old news, but in the past (when Flash 8 came out) if you used Persist's AspUpload component to upload files from flash, the component would crash which in turn meant that any site using it on your server wouldn't work until the server was rebooted.. whether is was used with just asp or within flash from that point on. This was a pain but at the time we were able to implement Coldfusion file upload at the time so didn't have to worry about it.

We are currently working on a new uploader application in flash for a client and it has to be ASP on the server side. So, on that note I wandered off to the AspUpload page hoping that something had been done about it and to my delight they have fixed the component to work with Flash 8.

The interesting thing on their site though is that they claim that the flash player doesn't send the information to the server properly, hence the crash of the component.

Quote from Persist's site:
Version 8 of Macromedia Flash includes a file upload feature which allows a user to upload files from within a Flash applet instead of a multipart/form-data form. Due to what we believe to be a bug in the Macromedia Flash 8 implementation of file uploads, the data stream generated by such Flash applets is formatted differently than all major browser implementations, and that irregularity causes AspUpload to crash.

I wonder which is "in the wrong" on this issue.. I'm just glad that one of them decided it was worth it to address the problem.

Anyways, you can DL the patched version of the component here.

Posted by Graeme at 06:17 AM | Comments (0)