Apache flex 具有关联数组的Flex TileList

Apache flex 具有关联数组的Flex TileList,apache-flex,associative-array,tilelist,Apache Flex,Associative Array,Tilelist,我有一个要使用TileList显示的关联数组。然而,它不明白被喂给它的是什么。我得到的只是TileList中的[对象] [bindable] public var people as array = new array(); private function loadArray():void{ people = decoded JSON array showPeople.dataProvider = people;} <mx:Tilelist id="showPeople" label

我有一个要使用TileList显示的关联数组。然而,它不明白被喂给它的是什么。我得到的只是TileList中的[对象]

[bindable]
public var people as array = new array();

private function loadArray():void{
people = decoded JSON array
showPeople.dataProvider = people;}

<mx:Tilelist id="showPeople" labelField="{data.name}" iconField="{data.imgURL}"/>
[bindable]
public var people as array=new array();
私有函数loadArray():void{
people=解码的JSON数组
showPeople.dataProvider=people;}
我尝试使用mx:itemRender,但它只会呈现一个项目,也就是人名字符串或url图像。最终目标是让TileList使用数组中的URL及其名称作为标签来显示一个人的图片。有什么建议吗

这个数组看起来像这样 “name”=>人名的字符串
“img'=>img URL的字符串

您应该使用自定义项目呈现器,如下所示:



通过这种方式,您可以根据需要自定义列表项。

什么是[对象]?你确定它正确解码了JSON数组吗?当我说[Object]时,我的意思是它在Tilelist所在的面板中显示了单词“[Object]”。康奈尔的回答非常有效。
<mx:itemRenderer>
  <mx:Component>
    <mx:HBox>
      <mx:Text width="100" height="100" text="{data.name}"/>
      <mx:Image width="100" height="100" source="{data.imgURL}"/>
    </mx:HBox>
  </mx:Component>
</mx:itemRenderer>