<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
		layout="vertical"
		verticalAlign="top"
		backgroundColor="black">

	<mx:Array id="arr">
		<mx:Object label="Banaan"
				thumbnailImage="pildid/banaan_icon.jpg"
				fullImage="pildid/banaan.jpg" />
		<mx:Object label="Auto"
				thumbnailImage="pildid/auto_icon.jpg"
				fullImage="pildid/auto.jpg" />
		<mx:Object label="Lehm"
				thumbnailImage="pildid/lehm_icon.jpg"
				fullImage="pildid/lehm.jpg" />
		<mx:Object label="Hobune"
				thumbnailImage="pildid/hobune_icon.jpg"
				fullImage="pildid/hobune.jpg" />
		<mx:Object label="Koer"
				thumbnailImage="pildid/koer_icon.jpg"
				fullImage="pildid/koer.jpg" />
		<mx:Object label="Kass"
				thumbnailImage="pildid/kass_icon.jpg"
				fullImage="pildid/kass.jpg" />
		<mx:Object label="Rebane"
				thumbnailImage="pildid/rebane_icon.jpg"
				fullImage="pildid/rebane.jpg" />
		<mx:Object label="Lennuk"
				thumbnailImage="pildid/lennuk_icon.jpg"
				fullImage="pildid/lennuk.jpg" />
	</mx:Array>

	<mx:Panel title="{horizontalList.selectedItem.label}"
			height="100%"
			horizontalAlign="center"
      verticalAlign="middle">
		<mx:Image id="img"
				source="{horizontalList.selectedItem.fullImage}"
				maintainAspectRatio="true"
				horizontalAlign="center"
				width="{horizontalList.width}"
				height="90%" />
		<mx:ControlBar horizontalAlign="center">
			<mx:HorizontalList id="horizontalList"
					labelField="label"
					iconField="thumbnailImage"
					dataProvider="{arr}"
					itemRenderer="CustomItemRenderer"
					columnCount="4"
					columnWidth="125"
					rowCount="1"
					rowHeight="150" />
		</mx:ControlBar>
	</mx:Panel>

</mx:Application>
