1 Reply Latest reply on Sep 13, 2006 4:56 PM by Jfill

    Populate ComboBox with HTTPService Object

    Jfill
      I cannot for the life of me find a good example of how to call an xml doc via HTTPService, then use the data to populate a combobox. Can someone please help me with this?

      Here is what I have so far.

      Part of the XML
      <?xml version="1.0" encoding="utf-8"?>
      <albumdirectory>
      <album id="1" details="Our trip to the cottage in 2005.">
      <title>
      Cottage 2005
      </title>
      <security pin="" />
      <photos>
      <photo details="">assets/gallery/nature01_sm.jpg</photo>
      <photo details="">assets/gallery/nature02_sm.jpg</photo>
      <photo details="">assets/gallery/nature03_sm.jpg</photo>
      <photo details="">assets/gallery/nature04_sm.jpg</photo>
      </photos>
      </album>
      </albumdirectory>

      Now here is what I have so far for the flex code.

      <mx:HTTPService
      url="assets/albums.xml"
      id="albumXML"
      showBusyCursor="true" />

      <mx:ComboBox width="100%" height="8%" id="albumBox" dataProvider="{albumXML.lastResult.albumdirectory.album}" labelField="title">

      </mx:ComboBox>

      Any help on how I can get this done would be great! Also any good resources on little "How-to" snippets would be great too.

      Thanks for you time