I have what may seem a silly question to all you Flex Ninjas out there, but I need to do the following and can't seem to find the right way to do so :
I have a TileList with a custom itemRenderer, each item being a thumbnail. The dataProvider is populated from a RemoteObject call. Next to the TileList I have a VBox containing an Image and Label. Now, when the user clicks on a thumbnail in the TileList, the Image and Label change accordingly using selectedItem. No problem. When the app first loads, I can use the "creationComplete()" event of the TileList to manually set the selectedIndex to 1 and therefore display the first thumbnail in my main Image control. Now the problem comes in, when the TileList's dataProvider changes (i.e. the user performs a search and the thumbnail list gets updated) - how do I then manually set the TileList's selectedIndex back to 1, since it seems to get cleared automatically (for good reason). I just have no idea which event to listen for - "dataChange" doesn't seem to work and having gone through the API, I can't see any other event which I can use. I'm also assuming here that only the TileList in this instance has a "selectedIndex" property. Like I said, it seems like a silly problem to have, and I'm getting pretty frustrated being held up by something this basic. Any help would be much appreciated - even if it's a pointer to a manual entry, anything :) TIA, Barry