Skip

i gotta get digivideowebificated!
November 30, 2007 8:39 PM   Subscribe

I'm trying to get the local webcam to stream to the stage on Flash CS3 actionscript3. When I run it, I get a blank screen and no errors. Any help at all would be appreciated. Here is my code so far: import flash.system.SecurityPanel; Security.showSettings(SecurityPanel.CAMERA); var cam:Camera = Camera.getCamera(name); var vid:Video = new Video(); vid.attachCamera(cam); stage.addChild(vid); Thanks!

Posted for a friend. I don't really know what any of this means.
posted by univac to Computers & Internet (3 answers total)
 
This works for me:

import flash.system.SecurityPanel;
Security.showSettings(SecurityPanel.CAMERA);
var cam:Camera = Camera.getCamera();
var vid:Video = new Video();
vid.attachCamera(cam);
addChild(vid);

My only change was to remove name from the third line. I'm not sure what "name" was doing there in your code.
posted by grumblebee at 9:17 PM on November 30, 2007


the name property should befrom the array of strings returned by Camera.names. Leave it out entirely to get the default camera.
posted by klanawa at 11:27 PM on November 30, 2007


I don't get the default camera when I run that script. I get a security window that allows me to choose which camera I want to use.

On my macbook, the dropdown contain three cameras. I'm not sure why. I only have one attached and have never installed any others. Maybe those three are hardcoded into the dropdown. And the one that's chosen by default doesn't work for me. I have to choose another one to get it working.
posted by grumblebee at 7:43 AM on December 1, 2007


« Older I'm a coder, with skills in py...   |  Probably about 5 years ago my ... Newer »
This thread is closed to new comments.


Post