title: passing array value from .as script to comboBox of .mxml code
body: <p>How to pass <code>array</code> value from <strong>.as</strong> to the <code>comboBox</code> of <strong>.mxml</strong> code?
  I am calling  a .as script in <strong>.mxml</strong> code. I have <code>&lt;mx:ComboBox&gt;</code> for which thr dataprovider is an <code>array</code> value coming from the same <strong>.as</strong> file. How to bind this to <code>combobox</code>?
  My both Codes are as follows:</p>
  
  <pre><code>// ActionScript file
  
      import flash.display.*;
      import flash.events.*;
      import flash.net.FileFilter;
      import flash.net.FileReference;
      import flash.net.FileReferenceList;
  
      import mx.controls.Alert;
  
          private var fr:FileReferenceList;
          private var fls:Array;
  
          private function folder():void
          {
              fr = new FileReferenceList();
              fr.browse([new FileFilter("Zip Files", "*.zip")]);
              fr.addEventListener(Event.SELECT, listZipFiles);            
          }
  
          private function listZipFiles(e:Event):void
          {
              Alert.show("selectHandler: " + fr.fileList.length + " files");          
              var file:FileReference = new FileReference;
              fls = new Array();
  
              for (var i:uint = 0; i &lt; fr.fileList.length; i++) 
              {
                  file = FileReference(fr.fileList[i]);
                  //Alert.show("File Name: " + fr.fileList[i]);
                  Alert.show("File Name: " + file.name);
                  fls.push(file);                         
              }
              Alert.show("fls: " + fls);
              gotoCmboBx(fls);
          }
  
          private function gotoCmboBx(arr:Array):Array
          {
  
          }
          private function getShpFiles(event:MouseEvent):void
          {
  
          }
  </code></pre>
  
  <p>and .mxml code is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"&gt;
      &lt;mx:Script source="Asset/folder.as" /&gt;
      &lt;mx:Button x="10" y="10" label="My Button" width="122" height="31" id="myButton" click="folder()"/&gt;
      &lt;mx:ComboBox x="10" y="49" id="cbobx" dataProvider="{fls}"  &gt;&lt;/mx:ComboBox&gt;
  
  &lt;/mx:Application&gt;
  </code></pre>