TileList显示的问题。
我有一个函数,想把TileList显示的内容通过一个函数的参数传递过来。
函数showTileList('这里放JSON好还是array')
{
这里如何和TileList把数据绑定到一起?
}
我目前的静态代码是这样的
public var myarr2:ArrayCollection=new ArrayCollection(
[{label:"省份",data:"Province" ,icon:"{images/b1.png}"},
{label:"地区",data:"County",icon:"images/b2.png"},
{label:"邮编",data:"Zipcode",icon:"images/b3.png"},
{label:"区号",data:"Areacode",icon:"images/b4.png"}]);
<mx:TileList id="tl1" x="114" y="110" dataProvider="{ary}" columnCount="1" width="450" height="293" direction="vertical" rowCount="3">
<mx:itemRenderer>
<mx:Component>
<mx:Canvas >
<mx:Image source="{data.icon}" width="50" height="50" scaleContent="true" />
<mx:Label text="{data.label}" width="125" />
<mx:Text text="{data.data}" width="100%" />
</mx:Canvas>
</mx:Component>
</mx:itemRenderer>
</mx:TileList>
问题:函数的参数要时什么格式比较好。我是基于socket的应用发送的
TileList如果加载这些数据?
[解决办法]
是不是要实现这么一个功能。
http://blog.minidx.com/2008/03/09/559.html
[解决办法]