如何识别tilelist中的选定对象?

我有tilelist,它是带有图片的动态加载的XML文件, 当我点击Label中的图片给她的名字时,我该怎么做?
 <mx:TileList id="tileList"
             alternatingItemColors="[#FFFFFF,#EEEEEE]"
             dataProvider="{xmlListColl}"
             itemRenderer="TileListItemRenderer"
             columnCount="3"
             columnWidth="100"
             rowCount="2"
             rowHeight="100"
             direction="horizontal"
             verticalScrollPolicy="on"/>
    
已邀请:
在你的TileList中调用一个函数
itemClick="somthingSelected();"

public function somthingSelected():void{
  trace( this.tileList.selectedItem.@id )
}
“id”是xml dataprovider中的属性或您想要的任何属性     

要回复问题请先登录注册