Copy link to clipboard
Copied
(Sorry, I'm so bad in english)
Be sure to freeze and continuously to get the camera object .
When I briefly described ,
■1frame:
import flash.media.Camera;
import flash.media.Video;
import flash.events.Event;
var video_obj:Video = new Video(320,240);
stage.addChild(video_obj);
var camera_obj:Camera
var cnt:int = 0;
■2frame:
camera_obj = Camera.getCamera();
if(camera_obj){
var camera_width:int = 400;
var camera_height:int = 300;
var camera_fps:Number = 30;
camera_obj.setMode(camera_width,camera_height,camera_fps);
video_obj.attachCamera(camera_obj);
cnt++;
txt.text = cnt.toString(); //txt = dynamic text
}
■10frame:
video_obj.attachCamera( null );
camera_obj = null;
■11frame:
gotoAndPlay(2);
Or cnt is no longer sight of solidified the image of the always when it comes to about 40 or more cameras Flash CC will freeze .
I want to make an app , such as a kiosk using the camera in the FLASH , but I am troubled by the malfunction of the camera .
What better solution proposal or would not.
*Webcam was used in the test
1)Microsoft Webcam: LifeCam HD 3000
2)Logitech Webcam C930e