camera=Camera.getCamera();
if(camera!=null){
camera.addEventListener(StatusEvent.STATUS,statusHandler);
camera.addEventListener(ActivityEvent.ACTIVITY,activityHandler);
private function statusHandler(evt:StatusEvent):void{
if(camera.muted) label.text="不能使用";
}
private function activityHandler(evt:ActivityEvent):void{
if(evt.activating){
label.text="检测开始";
}
else{
label.text="检测停止";
}
}