代码改变世界

多 相头

2010-03-21 11:39  宝宝合凤凰  阅读(223)  评论(1编辑  收藏  举报
Hi,

So I have seen other people with this problem and with all my searching
haven't found a solution on the web. I am trying to set up an array of webcams
feeding into flash at the same time but cant get it to recognize more then one
usb cam at a time. Since the flash camera class is based on the drivers list
instead of the camera I can only get it to recognize different camera types.
My thought is that since it is returning an array of names maybe it is a
multidimensional array and can be given a second ID some how but I havent found
anyway to do it. Any help ideas would be much appreciated. Below is what I
have thus far.

Thanks
Dave

________________________________________

var video1:Video = new Video();
var video2:Video = new Video();

trace(Camera.names);

var cam1:Camera = Camera.getCamera("6"); //Forces it to select the USB CAMERA
var cam2:Camera = Camera.getCamera("6"); //This is where being able to specify
6,1 would be helpful

cam1.setMode(800,600,30);
cam2.setMode(800,600,30);

video1.attachCamera(cam1);
video2.attachCamera(cam2);

video2.x=320;
addChild(video1);
addChild(video2);