Q:

knowing the exact index clicked in a Flex tree event

Please, i have a tree component that dispatches an itemOpen event. 
When the black triangle next to the yellow folder is clicked, that folder opens to expose its children. 
Is there anyway to know the index of the open folder? there is a rowIndex property in the target property of the openItem event that stores the index but it is not accessible. Does anyone knows or have come across situations like this one?
Thanks

A:

There is a function called itemRendererToIndex(itemRenderer:IListItemRenderer):int
ItemRenderer you can get from the dispatched event.
Adobe Documentation
Code smaple :
protected function tree1_itemOpenHandler(event:TreeEvent):void
{
 var index:int = tree.itemRendererToIndex(event.itemRenderer);
 trace(index);
}

