<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2007/09/25/creating-a-simple-label-function-on-a-flex-combobox-control/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
		layout="vertical"
		verticalAlign="middle"
		backgroundColor="white" viewSourceURL="srcview/index.html">

	<mx:Script>
		<![CDATA[
			import mx.utils.StringUtil;

			private function comboBox_labelFunc(item:Object):String {
				return StringUtil.substitute("{0} ({1})", item.@name, item.@abbrev);
			} 
		]]>
	</mx:Script>

	<mx:XMLList id="statesXMLList">
		<state abbrev="AL" name="Alabama" />
		<state abbrev="AK" name="Alaska" />
		<state abbrev="AZ" name="Arizona" />
		<state abbrev="AR" name="Arkansas" />
		<state abbrev="CA" name="California" />
		<state abbrev="CO" name="Colorado" />
		<state abbrev="CT" name="Connecticut" />
	</mx:XMLList>

	<mx:ComboBox id="comboBox"
			prompt="Please select a State..."
			dataProvider="{statesXMLList}"
			labelFunction="comboBox_labelFunc" />

</mx:Application>
