Mega Code Archive
Handling a user interaction by passing the event object to a function
import mx.collections.ArrayCollection;
import mx.events.ListEvent;
import mx.controls.Alert;
public var myAC:ArrayCollection = new ArrayCollection([
{name:"A", email:"j@domain.com"},
{name:"B", email:"f@domain.com"}]);
public function handleClick(evt:ListEvent):void
{
Alert.show(evt.rowIndex + " / col:" + evt.columnIndex + "." + "Which is for " + evt.currentTarget.selectedItem.name);
}