0 Replies Latest reply on Apr 8, 2013 2:15 AM by Tapanand85

    How to fix android camera preview?

    Tapanand85 Level 1

      Hi,

      I am using AS3 and Flash Builder 4.6 to develop app for android Samsung tablet. The camera preview is rotated -90 anticlock wise.

      I am need of urgent solution. Below is the code I am using:

       

      protected function setupVideo():void {

                                    _holdSprite = new Sprite();

                                    _holdSprite.x = 0;

                                    _holdSprite.y = 907;

                                    _video = new Video(907, 680);

                                    _video.x = -_video.width;

                                    _video.y = -_video.height;

                                    _holdSprite.addChild(_video);

                                    _holdSprite.rotation = 90;

                                    addChildAt(_holdSprite,0);

                          }

       

                          protected function setupCamera():void {

                                    _camera = Camera.getCamera();

                                    _camera.setQuality(0,60);

                                    _camera.setMode(680, 907, 50, false);

                                    _video.attachCamera(_camera);

                          }

       

       

      private function setups():void 

                          {

                                         setupVideo();

                                         setupCamera();

                          }

       

      screen.jpg

       

       

       

      Thanks and regards

      Tapanand