Camera is in use ??
Hi all,
How to detect camera is in use or not ?? Adobe says, if Camera.getCamera(); returns null, it means camera not installed, or in use ,
i use below, then when i start swf, first one is ok, but then i start new instance of app, it throws and error " .... flash 10 r2has stopped"
how can i solve that problem...
cam = Camera.getCamera();
if (!cam) {
myTextField.text = "No camera is installed.";
} else {
myTextField.text = "Connecting";
connectCamera();
}
private function connectCamera():void {
var vid:Video = new Video(150, 150);
vid.x = 10;
vid.y = 10;
vid.attachCamera(cam);
addChild(vid);
}
thanks..
