Camera

by umhr
Cameraクラス
* http://help.adobe.com/ja_JP/AS3LCR/Flex_4.0/flash/media/Camera.html
* 
* Videoクラス
* http://help.adobe.com/ja_JP/AS3LCR/Flex_4.0/flash/media/Video.html
* 
♥0 | Line 18 | Modified 2010-05-24 21:55:08 | MIT License
play

ActionScript3 source code

/**
 * Copyright umhr ( http://wonderfl.net/user/umhr )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/4eBq
 */

/*
 * Cameraクラス
 * http://help.adobe.com/ja_JP/AS3LCR/Flex_4.0/flash/media/Camera.html
 * 
 * Videoクラス
 * http://help.adobe.com/ja_JP/AS3LCR/Flex_4.0/flash/media/Video.html
 * */
package {
	import flash.display.Sprite;
	import flash.media.Camera;
	import flash.media.Video;
	public class Main extends Sprite {
		public function Main() {
			var camera:Camera = Camera.getCamera();
			//カメラの存在を確認
			if (camera) {
				camera.setMode(320, 240, 30);
				var video:Video = new Video();
				video.attachCamera(camera);
				this.addChild(video);
			} else {
				trace("カメラが見つかりませんでした。");
			}
		}
	}
}

Forked