title: Adobe AIR AS3 - Front facing camera
body: <p>I am currently using the code shown below to access and display the camera on an Android device. It works fine but instead of accessing the standard camera I would like to access the front facing camera. How can I modify the code below to do this ? Thanks in advance.</p>
  
  <pre><code>var cam:Camera = Camera.getCamera(); 
  var vid:Video = new Video(); 
  vid.attachCamera(cam); 
  addChild(vid);
  if (cam != null) 
  { 
      cam.addEventListener(StatusEvent.STATUS, statusHandler); 
      vid = new Video(); 
      vid.attachCamera(cam); 
  } 
  function statusHandler(event:StatusEvent):void 
  { 
      if (!cam.muted) 
      { 
          vid.width = cam.width; 
          vid.height = cam.height; 
          addChild(vid); 
  
      } 
      cam.removeEventListener(StatusEvent.STATUS, statusHandler); 
  } 
  </code></pre>