29. public class GetDepth extends Sprite
{
private var as3w:as3kinectWrapper;
private var _canvas:BitmapData;
private var _bmp:Bitmap;
public function GetDepth():void
{
init();
//將要建構的物件初始化
initListener();
//初始化偵聽事件
}
private function init():void
{
as3w = new as3kinectWrapper();
//建構as3kinectWrapper物件
_canvas = new BitmapData(as3kinect.IMG_WIDTH, as3kinect.IMG_HEIGHT, false, 0xFF000000);
//先建構一張空白的點陣圖資料好用來儲存深度影像
_bmp = new Bitmap(_canvas);
addChild(_bmp);
//將圖片加到場景上
}