hi all
i've new problem

im make mx:ComboBox that the data is from array that's request from mx:Text

i've two mx:Text that string source is

1.array string = 

['M3-02-06-2010-10-05-04.flv', 'M3-02-06-2010-22-17-16.flv', 
'M3-02-06-2010-12-07-06.flv', 'M3-02-06-2010-08-03-02.flv']

2.array string that source is from external fungtion (call with https)

THE PROBLEM IS:
if i call array from second mx:Text, the mx:ComboBox is not show data
but if i call array from first, the mx:ComboBox is not working

the source code is here:

<?xml version='1.0'?>
<!-- Simple example to demonstrate the ComboBox control. -->
http://www.adobe.com/2006/mxml' creationComplete='test()'>
<mx:HTTPService id='combolist' url='combolist' />
        <mx:Script>
                <![CDATA[
                        import mx.collections.ArrayCollection;
                        import mx.controls.Alert;
                        import mx.utils.ArrayUtil;
                        [Bindable]
                        private var cards:ArrayCollection;
                        private function test():void
                        {
                                combo = new ArrayCollection( ArrayUtil.toArray( 
String(green.text) ) );
                        }   
                ]]>
        </mx:Script>

        <mx:Panel title='ComboBox Control Example' 
                layout='horizontal'
                paddingTop='10' paddingBottom='10' paddingLeft='10' 
paddingRight='10'>

                <mx:ComboBox dataProvider='{combo}' />

                <mx:VBox>
                        <mx:Text  id='green' color='green' 
text="['M3-02-06-2010-10-05-04.flv', 'M3-02-06-2010-22-17-16.flv', 
'M3-02-06-2010-12-07-06.flv', 'M3-02-06-2010-08-03-02.flv']"/>
                        <mx:Text  id='red' color='red' text="{combolist}"/>

                </mx:VBox>         

        </mx:Panel>    
</mx:Application> 


      

Reply via email to