0
votes

Hi guys

i need turn off camera in android app created by adobe air 3 in flash cs6 .

i used this code for turn off camera :

videoDetect.attachCamera(null); videoCapture.attachCamera(null);

but when run in my device , error :

   An error has occurred in sub: settingm_camera1_ready
    (java line: 464)
    java.lang.IllegalStateException:The specified child already has a parent.you must call removeView() on the child s parent first.

plz help .

tanx

1

1 Answers

0
votes

try the following:

video.attachCamera(null);
video.clear();
removeChild(_video);
camera = null;