一个简单的测试摄像头的移动
var my_cam:Camera = Camera.get();
//my_cam.setMode(180, 140, 10, true);
my_video.attachVideo(my_cam);
my_cam.setMotionLevel(10, 1000);
//检测
my_cam.onActivity = function(active:Boolean) {
trace(active);
if (active) {
trace("你动了");
} else {
trace("你不动了");
}
};
本文转自:http://www.5uflash.com/flashjiaocheng/Flashaschengxu/530.html
var my_cam:Camera = Camera.get();
//my_cam.setMode(180, 140, 10, true);
my_video.attachVideo(my_cam);
my_cam.setMotionLevel(10, 1000);
//检测
my_cam.onActivity = function(active:Boolean) {
trace(active);
if (active) {
trace("你动了");
} else {
trace("你不动了");
}
};
本文转自:http://www.5uflash.com/flashjiaocheng/Flashaschengxu/530.html