<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="432" height="331" creationComplete="initApp()" viewSourceURL="/files/Tutorials/Flex/XMLAddress/srcview/index.html"> <mx:Script source="XMLAddressBookTutorialScript.as" /> <mx:HTTPService id="bookParser" url="http://blog.paranoidferret.com/files/Tutorials/Flex/XMLAddress/php/AddressBookParser.php" method="GET" resultFormat="text" /> <mx:Binding source="contactList.selectedItem as XML" destination="selectedContact" /> <mx:Panel width="100%" height="100%" layout="absolute" title="PHP and XML Address Book"> <mx:Label x="5" y="2" text="Contacts" fontSize="13"/> <mx:List id="contactList" height="216" width="162" y="25" x="5" dataProvider="{contacts}" labelFunction="showName"/> <mx:Label x="175" y="2" text="Contact Details" fontSize="13"/> <mx:Label x="175" y="28" text="Name:"/> <mx:Label x="237" y="28" id="contactName" text="{selectedContact.@name}"/> <mx:Label x="175" y="54" text="Phone:"/> <mx:Label x="237" y="54" id="contactPhone" text="{selectedContact.@phone}"/> <mx:Label x="175" y="80" text="Address:"/> <mx:TextArea x="237" y="79" id="contactAddress" height="59" editable="false" wordWrap="true" borderStyle="none" text="{selectedContact.address}"/> <mx:Label x="175" y="146" text="Notes:"/> <mx:TextArea x="237" y="146" id="contactNotes" height="95" borderStyle="none" editable="false" wordWrap="true" text="{selectedContact.notes}"/> <mx:ControlBar horizontalAlign="right"> <mx:Button label="Add Contact" click="addContact()" /> </mx:ControlBar> </mx:Panel> </mx:Application>