title: Populate comboBox in flex 4 using remote Object
body: <p>I have a remote object returned and I am trying to populate it into combobox.</p>
  
  <pre><code>&lt;s:RemoteObject id="ro" result="result(event)" destination="echoServiceDestination"&gt;
  
  private var statesData:ArrayCollection;
  
  private function result(e:ResultEvent):void{
     statesData = e.result as  ArrayCollection;
  
  }
  </code></pre>
  
  <p>How can I turn this collection into something like {label:"Red", data:"#FF0000"} so that I can populate into combobox </p>
  
  <p>The remote object is party and I can't seem to able to cast it as below</p>
  
  <pre><code>                  var party:Party = new Party;
  
              for(var i:int = 0 ; i &lt; statesData.length; i++)
              {
                  party = statesData.getItemAt(i);    
  
              }
  </code></pre>
  
  <p>Thanks for the help.</p>