I'm developing a Flash application that works with a web camera.
I want to analyze every frame of the video recording... which is the proper event listener?
This is my actual code:
private var video: Video;
private var webcam: Camera;
public function AugmentedReality() {
webcam = Camera.getCamera();
if (webcam != null) {
webcam.setMode(WEB_CAMERA_WIDTH, WEB_CAMERA_HEIGHT, VIDEO_FRAME_RATE);
video = new Video(VIDEO_WIDTH, VIDEO_HEIGHT);
video.attachCamera(webcam);
this.addChild(video);
this.addEventListener(Event.ENTER_FRAME, handler);
}
}
private function handler(aEvent : Event):void {
// I don't want to use this handler,
// it is called several times on the same frame if FPS is low
}