For the second view in the first main view, you use a TileList control, which lays out items from a dataProvider in rows or columns. In other respects, the TileList is similar to the List and ComboBox controls you have used previously. The MouseOver and MouseDown behaviors are built in (and you can modify them), and you can use the change event to fire an event handler.
Inside the Panel with the title "Tile," add a TileList control with
a dataProvider bound to myArrayOfObjects, width and height
both set to 100%, and the change event set to setStatus(event.target.selectedItem):
<mx:TileList dataProvider="{myArrayOfObjects}"
change="setStatus(event.target.selectedItem)" width="100%" height="100%"/>
Inside the script block at the top of the application, add function
block for the setStatus() function; the function takes
a parameter called item of type Object, and returns nothing:
function setStatus(item:Object):Void
{
}
Inside the function block, add a single line that sets the status
property of the surrounding Panel to "Revenue: "+item.revenue+" Volume: "+item.volume:
tilePanel.status="Revenue: "+item.revenue+" Volume: "+item.volume;
Note: Remember that the item passed to the function is the original data item associated with the repeated object where the event occurred.