topical media & game development

talk show tell print

flex-camera-video.ax

flex-camera-video.ax [swf] flex


  package 
  {
   import mx.containers.Panel;
   import flash.media.Camera;
      import flash.media.Video;
      import mx.core.UIComponent;   
  
  public class @ax-flex-camera-video extends Panel
   {
    public var video:Video
    public function @ax-flex-camera-video(){
     super();
     insertWebcamVideo();
    }
    public function insertWebcamVideo():void{
     var videoHolder:UIComponent = new UIComponent();
     var camera:Camera = Camera.getCamera();
     video = new Video(camera.width*2, camera.height*2);
           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.