0 Replies Latest reply on Jul 25, 2009 5:40 PM by 7546445

    Critical AIR Flex List Problem HELP PLEASE

    7546445 Level 1

      SORY FOR MY ENG...http://forums.adobe.com/images/emoticons/silly.gif

      Problem - Show Camera video displays as List Items in Adobe AIR. That is all.. So simple, but so impossible...

      I tried every way I know...I'm not a pro or some genius... But it should Be Simple! (as i thought) So I thought that would be the best one.. But it does not work... BAAAD...http://forums.adobe.com/images/emoticons/sad.gifhttp://forums.adobe.com/images/emoticons/cry.gif

      So my code

      ………………………………………………………………………………………………………………

       

      Application

       

      <?xml version="1.0" encoding="utf-8"?>

      <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">

                  <mx:List dataProvider="{Camera.names}"  itemRenderer="CamList"  left="10" right="10" top="10" bottom="10"></mx:List>

      </mx:WindowedApplication>

      …………………………………………………………………………………………………………………………………………………………………………..

      ListItemRenderer (CamList.mxml)

       

      <?xml version="1.0" encoding="utf-8"?>

      <mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init();" width="400" height="300">

            <mx:Script>

                  <![CDATA[

                          import mx.controls.Alert;

                          import mx.utils.ObjectUtil;

                        [Bindable]

                        private var cname:String = new String;         

                        private function init():void{

                        cname = data.toString();

                              attCamera();     

                        }

                        private function attCamera():void{

                        vid.attachCamera(Camera.getCamera(cname));

                        }

                  ]]>

            </mx:Script>

            <mx:VBox>

                  <mx:Label text="{cname}"/>

                  <mx:Label  id="uno"/>  

            </mx:VBox>

            <mx:VideoDisplay  id="vid" width="100%" height="100%"/>    

      </mx:HBox>

       

       

      PLEASE HEEEELP!!!