Skip to content

Commit bd3dbab

Browse files
author
Omar Diab
committed
mirror in flash
1 parent bcff0c8 commit bd3dbab

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

flash/Webcam.as

+8-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
private var jpeg_quality:int;
4040
private var image_format:String;
4141
private var fps:int;
42+
private var flip_horiz:Boolean;
4243

4344
public function Webcam() {
4445
// class constructor
@@ -52,6 +53,7 @@
5253
jpeg_quality = Math.floor( flashvars.jpeg_quality );
5354
image_format = flashvars.image_format;
5455
fps = Math.floor( flashvars.fps );
56+
flip_horiz = flashvars.flip_horiz == "true";
5557

5658
stage.scaleMode = StageScaleMode.NO_SCALE;
5759
// stage.scaleMode = StageScaleMode.EXACT_FIT; // Note: This breaks HD capture
@@ -87,6 +89,11 @@
8789
video.scaleX = video_width / dest_width;
8890
video.scaleY = video_height / dest_height;
8991
}
92+
93+
if (flip_horiz) {
94+
video.scaleX *= -1;
95+
video.x = video.width + video.x;
96+
}
9097

9198
camera.setQuality(0, 100);
9299
camera.setKeyFrameInterval(10);
@@ -187,4 +194,4 @@
187194

188195
}
189196
}
190-
}
197+
}

webcam.swf

56 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)