AIRKinect Basics 01

Notice: this tutorial was for versions 1.0 to 1.5, and does not work with the newer releases. See forum post at http://forum.as3nui.com/viewtopic.php?f=6&t=15

Hey guys! This is the first post I have come up with for the new site and with it is our first video tutorial showcasing how to use our Extension and start tracking skeletons like crazy. We will dive into making your first project in Flash Builder 4.6, you will need the prerelease here. If you are unable to get into the prerelease to get the program hold tight we will be going a ANT based tutorial in IntelliJ very soon.

We will be putting releases up at our AS3NUI GitHub site  as soon as we finish up the documentation of our code. We will be releasing SWC’s and ANE files along with giving access to much of the code base for people to start playing. Currently everything in in private as we get our initial releases ready. The ANE included in the demos here will be more then enough to get you started but isn’t final at all. So don’t plan on building your next multi million dollar project on this one just yet.

Video Tutorial – AIRKinect Basics for Flash Builder Video Tutorial 

MS Kinect Beta 2 SDK - http://kinectforwindows.org/

AIRKinect Basics Flash Builder Project - AIRKinect Basics 01 for Flash Builder

Hope you all find this as exciting as we do and we would love to hear your feedback. Also ASdocs will be out soon!

 

 

 

 

 

 

 

33 Responses to “AIRKinect Basics 01”

  1. Guys, this is exciting..
    If you need any help, I would be glad to contribute.
    (I could donate some money, as a starting point) :)

    can’t wait for the release!

  2. can`t wait for the SWC’s and ANE

  3. Felicitaciones por la librería, espero pueda hacer un tutorial donde no utilicemos flash builder y si flash develop.

    Estaré atento a su segundo tutorial

  4. Thanks for your hard work.
    I was able to make it working in Flash Develop 4 with flex 4.5.1 (and AIR 3.0).
    For some of the reasons _skeletonSprite.removeChildren(); did work for me so I made a quick fix.
    I’m also missing AIRKinectFlags class, so there was a fix too.

    If somebody need a source for FD4 just let me know.

    • Wow thanks Lukas! We totally missed this. We had put an older version of the ANE on github & here then was in the demo.
      This has been corrected if you go back here, http://www.as3nui.com/air-kinect/, and re-download the ANE you should see flags and such.
      removeChildren I do understand as that would not be in 4.5.1.

      thanks again!

  5. Could you share a info with us about simple gestures (swipe, click, wave) recognition. Do you have them in your roadmap? IF yes when we can expect them?

  6. @Radu: You do not have to wait for swc. Just duplicate ane and change the extension to swc :) .
    @Luis: If you need working project in FD4 just contact me.

    • Gracias @Lukas , yo tengo instalado mi flash Develop he ido a “project”, luego a properties y en custom sdk he colocado C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\4.5.1

      y me sale el siguiente error:

      Running process: C:\Program Files (x86)\FlashDevelop\Tools\fdbuild\fdbuild.exe “C:\Users\HP\Downloads\BasicKinect_01\BasicKinect_01.as3proj” -ipc 0a26a006-c485-46bc-9302-f921ecc6f4c6 -compiler “C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\4.5.1″ -notrace -library “C:\Program Files (x86)\FlashDevelop\Library”
      Building BasicKinect_01
      mxmlc -load-config+=obj\BasicKinect_01Config.xml -incremental=true +configname=air -locale en_US -o obj\BasicKinect_01634571243533567886
      Starting java as: java.exe
      INITIALIZING: Adobe Flex Compiler SHell (fcsh)
      Starting new compile.
      Loading configuration file C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\4.5.1\frameworks\air-config.xml
      Loading configuration file C:\Users\HP\Downloads\BasicKinect_01\obj\BasicKinect_01Config.xml
      C:\Users\HP\Downloads\BasicKinect_01\src\BasicKinect01.as(49): col: 44 Error: Type was not found or was not a compile-time constant: SkeletonFrameEvent.
      protected function onSkeletonFrame(event:SkeletonFrameEvent):void {
      ^
      C:\Users\HP\Downloads\BasicKinect_01\src\BasicKinect01.as(84): col: 39 Error: Type was not found or was not a compile-time constant: CameraFrameEvent.
      protected function onRGBFrame(event:CameraFrameEvent):void {
      ^
      Build halted with errors (fcsh).
      (fcsh)
      Done(1)

      ____________________________________________________________________

      Es posible que sea por que el sdk es 4.5.1 y ustedes estan usando el 4.6
      pero no he logrado descargar de la página de adobe este sdk, alguno de ustedes lo tiene para la descarga ?

      Agradezco tu respuesta

  7. Hi
    Thanks for great job!
    Your exe files works fine by me, but I don’t have received a FB4.6 prerelease yet, and can’t get it work within FlashDevelop.

    I try to import my AIRKinectExtension.ane into my libs, also copying it with the swc extension, as seen in some android extension for air 3 tutorials, but my swc shows a “cannot find central directory” error message.
    When I test for an android air with the vibrator or compass, it works fine…
    Do I have to do something else to make it work for kinect on desktop?
    thanks guys!
    makar

    • hi

      ok, found for first error : if I follow the ANE file download link on your blog, it gives me a HTML formatted file, even with rightclic/dl… so I grabbed it from your example archive and it passed the problem.

      But I still have a new wall I can’t climb over : wether I use Flash Develop or Flash Builder 4.5.1 with air 3, I get an error saying the extension can’t be found.
      It happens when I modify the app.xml to add the extensions, and breaks with
      “com.as3nui.nativeExtensions.kinect.AIRKinect” (the class path we see in the swc) but also with all other I’ve tested (i.e “com.as3nui.extensions.AIRKinect” like in your example)
      Do I write the wrong path or does ti comme from another error?
      How long does it take to be accepted or refused for the pre-release program? :)

      Lukas, I’d enjoy to see your sources if you can send it to me or filetransfer it, please.

      @Luis : hay algunos post sobre la possibilidad de hacer eso con FB 4.5.1 con el update AIR 3.1, pero sigo teniendo problemas…

      thx,
      makar

      • Whoops :( again sorry for the messed up ANE link, we are fixing that right now.

        As far as the Descriptor Extension syntax it should look like this

        com.as3nui.extensions.AIRKinect

        I have not tired Flash Builder 4.5 or FlashDevelop but I will try to look into those soon and get another video tutorial out.

      • Hey makar, the link has been fixed and thanks for catching that.
        I would highly suggest using the Flash Builder 4.6 pre-release. The pre-release IDE is setup to use ane files – just make sure you check the “package” option, else you will want to look at ant.

        • Thanks

          For 4.6 pre-release, I’ve asked it this morning (it’s 8pm now)… I don’t know how long I’ll have to wait.
          for the extension, I’ve tried both links, but it still doesn’t work.
          Here’s a post from FD co-author Philippe Elsass : http://tinyurl.com/7mylypj
          explaining how to use it in flashdevelop.
          And I followed several others for flash builder 4.5.1 on adobe forums
          Most of them speak about mobile export, but porting it to desktop isn’t the biggest problem I think? just modifying the app.xml to accept “extendDesktop” supportedProfile, and adding the extension should make it work.
          I’ve mailed Lukas for his source code.

          If I can help, just tell me.
          regards
          makar

  8. Una pregunta, solo funciona con flex sdk 6 ?

  9. Hey guys. To make it working with flex 4.5.1 and Flash develop 4 I had to unzip ane to the specific folder “AIRKinectExtension.ane”. I mostly follow the procedure described here http://tinyurl.com/7mylypj (as Makar mention it). The only difference is that, as I said, I unzip ane. You can read that for more info: http://adobe.ly/nsz69A
    If somebody still need a help or my sources, please contact me.

    • that’s just perfect!
      thanks a lot

      so here’s the synthesis of all your great work, guys:
      the way to do with a desktop app in flash develop 4.0.0 RC2 (or flash builder 4.5.1):
      - download and install flex sdk 4.5.1 + air 3.1
      - create an AS3 air project
      - check the “extended desktop” profile in the project air properties, “installation” tab (flashdevelop), or direclty in the app.xml
      - make 2 copies of your ANE, 1 with “zip” extension, and the other with “swc”
      - unzip the first one into a “extensions” folder, and copy the swc in the “lib” folder
      - “right-clic/add to library” on the swc (flashdevelop) or right-clic project/properties, “libraries” tab, “add swc file”, point to swc (flash bluider)
      - check the “external library” (right clic/option on swc in FD, option in lib tab in FB)
      - add “-extdir extensions” at the end of the “adl” line in run.bat (didn’t test in FB, but maybe add the extension folder to src path in project properties?”
      - declare the extension in app.xml with com.as3nui.extensions.AIRKinect
      - compile and enjoy

      thx

      makar

  10. Muchas Gracias @makar y @Lukas he logrado ejecutar el código que me obsequiaste, debo decir que conozco a muchos desarrolladores en Perú que a pesar de tener mucho conocimiento no suelen compartir código y peor aún no suelen compartir conocimiento.

    Para los que quieran ejecutar esta librería en flash develop y espero @Lukas no te molestes de compartir aquí el zip que me enviaste, solo con el fin de “compartir conocimiento” hice un pequeño screencast donde queda claro el funcionamiento de la librería y como es que se debe cambiar del código que adjuntaré la ruta del SDK .

    Esta modificación de Flash Develop es de propiedad de @Lukas que espero no le moleste el que publique aquí un link para descarga .

    http://dl.dropbox.com/u/862935/as3nui/as3nui_fd4.zip

    @Ross Gracias por el esfuerzo y compartir libremente AS3NUI

  11. Olvida el screencast de esta librería de @Ross corriendo en flash develop

  12. I’ve got a error message, when I run your AIRKinect Demo
    it said “missing MSVCR100D.dll”, I have check it from internet and found need install “vredist_x86″. But still doesn’t work.

  13. I’m on board for sure, but will be using Flash CS5.5

  14. Hey guys,that is cool with FD.But what about FB 4.5? How do we setup an ANT + the project to run the extension ?

  15. Someone can pubblish the project for fd or for fb 4.1? or someone can pubblish a video tutorial on fb or fd? tnx

  16. @luis2009: I had the same issue. And I follow the most dangerous way ever :) , I downloaded that dll from the web. This dll should be in a microsoft Visual C++ 2010 Redistributable Package but unfortunatelly it was not working for me.

  17. @Luis Rodriguez: I have no problem with sharing. I hope that this will help anyone and also maybe somehow help guys behind AIRKinect.

  18. Hi I finally got the AIRKinect native extension working on Flash Develop. I’ve been playing with it non-stop this whole evening.

    One thing I can’t accurately do is to overlay the skeleton directly on top of the camera image. I’ve been trying to figure it out but the z position and scale always seems a little off.

    I have a 800×600 camera image, and I’m using SkeletonPosition.TRANSLATION_MODE = SkeletonPosition.DEPTH_CAMERA_TRANSLATION_MODE; All x and y values of skeletonPosition elements are multiplied by 800 and 600 respectively. But I’m having problems with z and scale values.

    I’ve checked the ASDocs and found this line:
    var scaler:Vector3D = new Vector3D(stage.stageWidth, stage.stageHeight, KinectMaxDepthInFlash)

    but I don’t know how to get KinectMaxDepthInFlash.

    Hope you could help me out. Thanks!

    Really looking forward to updates :)

  19. Hey everyone, I was hoping we could move the general comments to the github repository as issues. It is easier to keep items aligned and make sure we are providing as much information as possible on a wide range of topics. We have ported a couple of the threads over but please feel free to make changes or updates. Thanks again for providing feedback and making this better and easier.

    Github: http://github.com/AS3NUI/AIRKinect

  20. Wow! Playing around with the FD package right now. Please keep up the good work. Can´t wait to see future releases and extensions. Thanks, Felix

  21. Hi i am getting the following error when i try to run the project. A solution would be greatly appreciated.
    The AIRKinectDemo.exe works fine

    VerifyError: Error #1014: Class com.as3nui.nativeExtensions.kinect.events::CameraFrameEvent could not be found.

    at runtime::ContentPlayer/loadInitialContent()
    at runtime::ContentPlayer/playRawContent()
    at runtime::ContentPlayer/playContent()
    at runtime::AppRunner/run()
    at ADLAppEntry/run()
    at global/runtime::ADLEntry()

    my code
    package
    {
    import com.as3nui.nativeExtensions.kinect.AIRKinect;
    import com.as3nui.nativeExtensions.kinect.data.AIRKinectFlags;
    import com.as3nui.nativeExtensions.kinect.events.CameraFrameEvent;

    import flash.display.Bitmap;
    import flash.display.BitmapData;
    import flash.display.Sprite;
    import flash.events.Event;

    public class KinectVideoTut extends Sprite
    {
    private var _rgbImage:Bitmap;
    public function KinectVideoTut(){
    _rgbImage = new Bitmap(new BitmapData(640,480));
    this.addChild(_rgbImage);
    this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
    }
    protected function onAddedToStage(event:Event):void{
    initKinect();
    }
    private function initKinect():void{
    var flags:uint = AIRKinectFlags.NUI_INITIALIZE_FLAG_USES_SKELETON | AIRKinectFlags.NUI_INITIALIZE_FLAG_USES_COLOR;
    AIRKinect.initialize(flags);
    AIRKinect.addEventListener(CameraFrameEvent.RGB, onRGBFrame);
    }
    protected function onRGBFrame(event:CameraFrameEvent):void{
    _rgbImage.bitmapData = event.frame;
    }
    }
    }

  22. hi,

    thanks for this great project. unfortunately i cannot compile it.
    it says:

    ArgumentError: Error #3500: The extension context does not have a method with the name init.
    at flash.external::ExtensionContext/_call()
    at flash.external::ExtensionContext/call()
    at com.as3nui.nativeExtensions.kinect::AIRKinect/createContext()[C:\Users\rgerbasi\Desktop\2011_10_16_AIRKinect\flash development\AIRKinect Extension\src\com\as3nui\nativeExtensions\kinect\AIRKinect.as:283]
    at com.as3nui.nativeExtensions.kinect::AIRKinect()[C:\Users\rgerbasi\Desktop\2011_10_16_AIRKinect\flash development\AIRKinect Extension\src\com\as3nui\nativeExtensions\kinect\AIRKinect.as:271]
    at com.as3nui.nativeExtensions.kinect::AIRKinect$/get instance()[C:\Users\rgerbasi\Desktop\2011_10_16_AIRKinect\flash development\AIRKinect Extension\src\com\as3nui\nativeExtensions\kinect\AIRKinect.as:75]
    at com.as3nui.nativeExtensions.kinect::AIRKinect$/initialize()[C:\Users\rgerbasi\Desktop\2011_10_16_AIRKinect\flash development\AIRKinect Extension\src\com\as3nui\nativeExtensions\kinect\AIRKinect.as:83]
    at BasicKinect01/initKinect()[C:\Users\fresh-e\Downloads\BasicKinect_01\src\BasicKinect01.as:42]
    at BasicKinect01/onAddedToStage()[C:\Users\fresh-e\Downloads\BasicKinect_01\src\BasicKinect01.as:37]
    at runtime::ContentPlayer/loadInitialContent()
    at runtime::ContentPlayer/playRawContent()
    at runtime::ContentPlayer/playContent()
    at runtime::AppRunner/run()
    at ADLAppEntry/run()
    at global/runtime::ADLEntry()

  23. Hi Ross,

    I’ve downloaded the project and installed FB4.6 and have the AIRKinect demos working fine, but when I try and build the project (downloaded from above link) all I get is:

    VerifyError: Error #1014: Class com.as3nui.nativeExtensions.kinect.data::SkeletonPosition could not be found.

    What can I do about this? Any help appreciated..

  24. Guys,

    Cfr notice on top of the post: this only worked for versions 1.0 up to 1.5. The API has been changes since 1.6, so the tutorial / project above will not work in these newer versions.

Trackbacks/Pingbacks

  1. blog.alumican.net » Blog Archive » AIRKinect Extension (AIR + ANE + Kinect)を動かす - [...] ここからFlash Builder用のプロジェクトをダウンロードする。 [...]
  2. AIRKinect in FlashDevelop | as3NUI - [...] is to get AIRKinect running and packaging out in FlashDevelop. If you haven’t checked out the first tutorial on ...
  3. AIRKinect in IntelliJ IDEA | as3NUI - [...] or any native extension really, running in IntelliJ IDEA. Again if you haven’t check out the first tutorial on Flash ...

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>