topical media & game development

talk show tell print

lib-flex-animation-code-05-CameraTest.ax

lib-flex-animation-code-05-CameraTest.ax (swf ) [ flash ] flex


  package {
          import flash.display.Sprite;
          import flash.display.StageAlign;
          import flash.display.StageScaleMode;
          import flash.media.Camera;
          import flash.media.Video;
  
          public class @ax-lib-flex-animation-code-05-CameraTest extends Sprite
          {
                  private var _cam:Camera;
                  private var _vid:Video;
                  
                  public function @ax-lib-flex-animation-code-05-CameraTest()
                  {
                          stage.align = StageAlign.TOP_LEFT;
                          stage.scaleMode = StageScaleMode.NO_SCALE;
                          
                          _cam = Camera.getCamera();
                          _cam.setMode(640, 480, 15);
                          _vid = new Video(640, 480);
                          _vid.attachCamera(_cam);
                          addChild(_vid);
                  }
          }
  }
  


(C) Æliens 18/6/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.