AIRKinect Extension is a Native Extension for use with Adobe AIR 3.0. AIRKinect allows AIR developers to tap into the rich experience of the Microsoft Kinect and push interactivity to a new level.
You can find the compiled .ane file in the bin directory of this repository.
Before you can use the native extension in your AIR project, you will need to install the kinect drivers. You have several options, depending on your platform.
- Install Microsoft Kinect SDK: http://kinectforwindows.org/
- That's it
You can use the instructions "Install OpenNI,NITE and the Sensor Driver" of the SimpleOpenNI project to get OpenNI up and running on your windows 7 machine: https://code.google.com/p/simple-openni/wiki/Installation_PreOpenNI2#Windows. Make sure you install the 32-bit version. AIRKinect does not work with the 64-bit version.
You can use the instructions "Install OpenNI the short way" of the SimpleOpenNI project to get OpenNI up and running on your OSX machine: https://code.google.com/p/simple-openni/wiki/Installation_PreOpenNI2#OSX.
All you need is the ane file matching your driver. If you are using the MS SDK, you will need airkinect-2-core-mssdk.ane, if you are using OpenNI, you will need airkinect-2-core-openni.ane.
Once you have the correct file, you will need to link it to your AIR project:
- Right click on your AIR for desktop project and choose properties.
- Select Actionscript build path > Library path and click on Add SWC… Select the ane file you just downloaded.
- In that same window, choose Native Extensions and click on Add ANE… Select that same ane file.
- Select Actionscript Build Packaging > Native extensions. Check the checkbox next to the native extension. Ignore the warning that says the extension isn't used.
- Go the File > Actionscript settings.
- On the Library Path tab, click on the "Browse to a Native Extension (ANE)" button (button to the right of the SWC button)
- Choose the ane file you just downloaded.
- Right click on your module and choose "Open Module Settings".
- Select the build configuration for your Module and open the Dependencies tab
- Click on the plus (+) button on the bottom of that window and choose "New Library…"
- Choose the ane file you just downloaded
AIRKinect has a lot of built-in features. You can check some examples in our examples repository.
A quick example, showing the depth image would be something like this:
private var depthBitmap:Bitmap;
private var device:Kinect;
public function Demo() {
if (Kinect.isSupported()) {
device = Kinect.getDevice();
depthBitmap = new Bitmap();
addChild(depthBitmap);
device.addEventListener(CameraImageEvent.DEPTH_IMAGE_UPDATE, depthImageUpdateHandler);
var settings:KinectSettings = new KinectSettings();
settings.depthEnabled = true;
device.start(settings);
}
}
protected function depthImageUpdateHandler(event:CameraImageEvent):void {
depthBitmap.bitmapData = event.imageData;
}
Copyright 2012 AS3NUI Licensed under the Apache License, Version 2.0 (the ""License");
You may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0/
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.