I have a list and when an item in the list is selected, I need to fire a function.
At the moment I have a list like this:
(The dataProvider gets filled by the user)
I've attached an event listener to the list like so:
And then at the moment the function that I want to fire just looks like this:
private function showWebsitesImageURL(event:ListEvent):void
But I don't get an alert when selecting the list items. It worked when I listened for a ListEvent.ITEM_CLICK instead of ListEvent.ITEM_FOCUS_IN, but the ListEvent.ITEM_CLICK doesn't work for when changing the list selection with the keyboard. I also want to do the same thing for any ListEvent.ITEM_FOCUS_OUT events on the list (so I can access the previously selected item).
Can anyone help me with this?