使用Flash AS3可以同时使用3个网络摄像头吗?
您好,我使用以下代码一次显示3个网络摄像头
但它只适用于2.
getCamera(" 0")和getCamera(" 1")= ok
getCamera(" 1")和getCamera(" 2")= ok
getCamera(" 0")和getCamera(" 2")= ok
getCamera(" 0")和getCamera(" 1")和getCamera(" 2")= NOT
var cameras = Camera.names;
trace('Cameras: '+cameras);
// Cameras: Microsoft® LifeCam HD-3000,Integrated Webcam,USB2.0 Camera,IP Camera [JPEG/MJPEG]
// Camera.getCamera("0") = Microsoft® LifeCam HD-3000
// Camera.getCamera("1") = Integrated Webcam
// Camera.getCamera("2") = USB2.0 Camera
var camera0:Camera = Camera.getCamera("0");
camera0.setMode(400, 300, 100);
camera0.setQuality(0,100);
var video0:Video = new Video();
video0.smoothing = true;
video0.width = 400;
video0.height = 300;
video0.x=0;
video0.y=0;
video0.attachCamera(camera0);
addChild(video0);
var camera1:Camera = Camera.getCamera("1");
camera1.setMode(400, 300, 100);
camera1.setQuality(0,100);
var video1:Video = new Video();
video1.smoothing = true;
video1.width = 400;
video1.height = 300;
video1.x=400;
video1.y=0;
video1.attachCamera(camera1);
addChild(video1);
var camera2:Camera = Camera.getCamera("2");
camera2.setMode(400, 300, 100);
camera2.setQuality(0,100);
var video2:Video = new Video();
video2.smoothing = true;
video2.width = 400;
video2.height = 300;
video2.x=800;
video2.y=0;
video2.attachCamera(camera2);
addChild(video2);