0 Replies Latest reply on Nov 5, 2009 8:07 AM by d-dub300

    Camera.setMode crashes the Flash Player?!?

    d-dub300

      Hey folks...

       

      I have some pretty simple code that seems to cause the Flash Player to crash when there isn't a camera connected. 

       

      camera = Camera.getCamera();

      if (camera) {

           camera.setMode(this.width,this.height,20,true);

      } else {

        ....

      }

       

      Even when a camera is NOT connected, the Camera.getCamera() call returns the name of the last camera that was connected to my system.  So, because there is NO camera actually attached to the system, the setMode() call causes a fault in the Flash Player, and it all dies a horrible screaming death!

       

      What am I missing?  Is there a way that I can detect if the user actually has a camera connected?

       

      Thanks!

       

      - Dennis