topical media & game development
actionscript-omr-lib-WebcamPanel.ax
actionscript-omr-lib-WebcamPanel.ax
[swf]
flex
package
{
import mx.containers.Panel;
import flash.media.Camera;
import flash.media.Video;
import mx.core.UIComponent;
public class @ax-actionscript-omr-lib-WebcamPanel extends Panel
{
public var video:Video
public function @ax-actionscript-omr-lib-WebcamPanel(){
super();
insertWebcamVideo();
}
public function insertWebcamVideo():void{
var videoHolder:UIComponent = new UIComponent();
var camera:Camera = Camera.getCamera();
// camera.setMode(
camera.setLoopback(false);
camera.setMode(640,480,30,true);
camera.setQuality(0,100);
video = new Video(camera.width, camera.height);
// video = new Video(50,50);
video.attachCamera(camera);
videoHolder.addChild(video);
addChild(videoHolder);
videoHolder.y =10;
}
}
}
(C) Æliens
27/08/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.