Quantcast
Channel: Adobe Community : All Content - AIR Development
Viewing all articles
Browse latest Browse all 2954

AIR 16 Camera breaks app ( Works fine in AIR 15 ) - [HELP]

$
0
0

Everything worked fine in AIR 15 .. As soon as I switch to 16 .. If I open the camera image picker for iOS .. even if I just choose "Cancel". The app freezes and is not responding anymore.

 

Has anyone seen this or know of a fix ?

 

 

Here is what I am doing

 

// =================================================================================
// initCamera
// =================================================================================  function initCamera(evt:Event):void{                        endTouchX = mouseX;  endTouchY = mouseY;  if (startTouchX - endTouchX < 25 && startTouchX - endTouchX >-25 && startTouchY - endTouchY < 25 && startTouchY - endTouchY >-25) {  takePhotoBTN.alpha = 1;  trace("Starting Camera");                           if( CameraUI.isSupported )                        {  showTransitionPanel();                                cameraUI.addEventListener(MediaEvent.COMPLETE, imageSelected);                                cameraUI.addEventListener(Event.CANCEL, browseCancelled);                                cameraUI.addEventListener(ErrorEvent.ERROR, mediaError);                                                              cameraUI.launch(MediaType.IMAGE);        clearGrid();                        }                        else                        {                                mainScreen.feedbackText.text = "Camera not supported.";                        }                 }  }                                                               // =================================================================================                // initCameraRoll                // =================================================================================                function initCameraRoll(evt:Event):void                {                         endTouchX = mouseX;  endTouchY = mouseY;  if (startTouchX - endTouchX < 25 && startTouchX - endTouchX >-25 && startTouchY - endTouchY < 25 && startTouchY - endTouchY >-25) {  importPhotoBTN.alpha = 1;  trace("Opening Camera Roll");                                              if(CameraRoll.supportsBrowseForImage)                        {                                 showTransitionPanel();                                                               // Add event listeners for camera roll events                                cameraRoll.addEventListener(MediaEvent.SELECT, imageSelected);                                cameraRoll.addEventListener(Event.CANCEL, browseCancelled);                                cameraRoll.addEventListener(ErrorEvent.ERROR, mediaError);                                   // Open up the camera roll                                cameraRoll.browseForImage();     clearGrid();                                                       }                        else                        {                                mainScreen.feedbackText.text = "Camera not supported.";                        }  }                }

Viewing all articles
Browse latest Browse all 2954

Trending Articles