/ Published in: ActionScript 3
Expand |
Embed | Plain Text
import flash.media.Camera; import flash.media.Video; private function getCamera ():void { //Create a video instance var video:Video = new Video(640, 480); //Get the camera reference. var camera:Camera = Camera.getCamera(); //setMode need 3 params, width, height and frame rate. //Optianally you can set a boolean value at the end for the favorArea. camera.setMode(640, 480, 30); //put the camera in the video instance video.attachCamera(camera); addChild(video); }
You need to login to post a comment.
