Finally! No betas! Flash and Kinect using the version 1 SDK

Out of all the articles and tutorials I've written, by far the most popular have been the Flash and Kinect pieces. Since the February 1st release of the version 1 Kinect SDK, I've gotten quite a few questions about how to get Flash working with Kinect again. Many readers were having trouble with the old tutorials which no longer work as they were based on the beta release of the SDK. I decided to take a break from my current project this weekend and throw together a quick Kinect to Flash demonstration with the new SDK. This isn't a tutorial, but you can download the source files and see how it was made!

The application is a simple cursor application. The C# app tracks the position of your right hand, sends that data to a nodejs server, which in turn passes the data on to Flash. Flash then uses the data to move a circular cursor around the screen. I also put a movieclip in the background that changes its alpha based on the cursor's y position just to make things a little more interesting. For this, I'm using the latest version of node.js, so you may want to grab that first.

Also, if you're having trouble getting Kinect up and running, I highly recommend using the Channel9 quick start series. The video tutorials are pretty helpful, especially for getting the SDK installed and making sure you're adding the right references to the C# project. Admittedly, I don't like how they're using pre-made components this time around and my project doesn't include those. I feel it would be more beneficial if they walked through the code from scratch, but the videos are still the best resource for getting things up and running quickly.

Anyway, you can grab my project source files right here! I hope this helps!

Bookmark and Share

7 Responses to “Finally! No betas! Flash and Kinect using the version 1 SDK”

  1. Luis Rodriguez says:

    Hola, el proceso de usar node.js es bueno pero te recomiendo que pases a usar AIRKINECT , te facilitará la vida montones.

    http://as3nui.com/

  2. Rhuno says:

    Hey Luis, thanks! I know you mentioned it before also and I have taken a look at it. It is definitely a great solution and I would probably use it if I were making an actual Flash-based application.

    The reason I’ve chosen not to use it, at least for these projects, is because it completely abstracts the underlying sdk. A good chunk of the experience here is that you get to dig into the actual Kinect sdk provided by Microsoft. It’s helpful in general to tinker with different technologies and gaining experience using sockets with C# and nodejs holds benefits beyond the use of Flash and Kinect. Also, the AIRKinect sdk is limited to just AIR, where as other methods can be adapted to different platforms.

    All that said, AIRKinect is a fantastic platform and certainly worth checking out for making serious Flash-based kinect projects.

  3. Anders Weile says:

    It works flawlessly.
    However; how difficult is it to feed the Kinect webcamdata to the SWF-file? Is it even nescessary, or can the flash-file access the webcam directly?

    Best regards

  4. Rhuno says:

    Thanks, Anders. Flash doesn’t seem to recognize Kinect as a webcam. I experimented with this just last night using Camera.getCamera() and got back null.

    I haven’t tried passing the image data through the server to Flash. I’m not sure it would work too well considering the amount of data being transmitted and the speed at which you’d want it. But who knows? Definitely worth a shot.

  5. Anders Weile says:

    OK, I’ll continue to keep looking for some solution.
    However; I’ve made a work-around.

    I’ve made a simple C# form application, which has an embedded Flash-object in it. The coordinates are then pushed into the SWF-file, using some of the code from this page: http://blog.another-d-mention.ro/programming/communicate-betwen-c-and-an-embeded-flash-application/

    This way, I can display the webcam data in C# and have the flash-file, lying on top of it. I just need to make the SWF transparent, but don’t think, it should be a problem.

  6. Michal says:

    Hi!
    I downloaded the files but the flash is not opening…
    I have CS4, is that the reason?

  7. Rhuno says:

    Michal,

    I can’t remember for certain, but I believe you need CS 5 or 5.5 to open the flash project.

Leave a Reply

Subscribe to RSS feed FGS5 Badge