flex - Camera.names not working in flash builder burrito -
im using camera class in mobile application , used camera.names fill list , tried pass selected value getcamera() method not working.here s code
private function init():void { if (camera.names.length == 0) { lab.text = "no camera attached"; list.enabled = false; textarea.enabled = false; } } protected function list_changehandler(event:indexchangeevent):void { var tlist:list = evt.currenttarget list; var cameraname:string = tlist.selectedindex.tostring(); camera = camera.getcamera(cameraname); vid=new video(); vid.attachcamera(camera); uic.addelement(vid ivisualelement); textarea.text = objectutil.tostring(camera); } <s:list id="list" dataprovider="{camera.names arraycollection}" width="200" change="list_change(event);" /> <s:group id="uic" x="68" y="253" width="368" height="281"> </s:group>
when compiling air mobile, need make sure permissions placed in app xml file. in case, need give app permission access camera work.
Comments
Post a Comment