title: Flex Create an array of images to insert into a itemRenderer
body: <p>I am trying to loop through a list of images and then add them to list box with a itemRenderer </p>
  
  <pre><code>public function createDataProvider():ArrayList
  {
  
      var a:Array = new Array();
      for (var i:int = 0; i &lt; select_query.data.length; i++){
          var x:Image = new Image(); 
          x.height = 95
          x.width = 126
          x.id = "list_image_" + i
          x.source = (PathToMyImage); 
  
           a[i] = x
  
  
      }
      return new ArrayList(a);
  }
  &lt;s:List id="myListX" width="234" height="550"
          dragEnabled="true" dropEnabled="true" dragMoveEnabled="true"
          dataProvider="{createDataProvider()}"&gt;
      &lt;s:layout&gt;
      &lt;s:TileLayout id="myListX_tiles" 
                    requestedRowCount="1"
                    horizontalGap="0"
                    verticalGap="0" horizontalAlign="center" verticalAlign="middle" /&gt;
      &lt;/s:layout&gt; 
          &lt;s:itemRenderer&gt;
  
          &lt;/s:itemRenderer&gt;        
  &lt;/s:List&gt;
  </code></pre>