I have a HorizontalList and have assigned a itemrenderer to it, I see the content being displayed etc and all works fine.
now I need to iterate through the contents of the HorizintalList.
ie, I have assigned a custome Item renderer that has a image and two labels, now I need to access the data stored in these two lables of the selected Item.
My exact question is how do i access the data contents of the items in the HorizontalList?
The horizontal list is just rendering the items in the dataProvider. So why not iterate over the dataProvider?
If you need to access the data in the selected item then use the horizontal list's selectedItem property.
You can use the itemToItemRenderer method of the HorizontalList class. Code will be something like this
var renderer:MyItemRenderer = hl.itemToItemRenderer(hl.selectedItem) as MyItemRenderer ;
MyItemRenderer is the item renderer class and hl is the horizontal list
thanks a lot guys!