3 Replies Latest reply on Jul 14, 2009 9:29 AM by Tpae

    Populating Individual Element in ArrayCollection with HTTPService

    Tpae

      Hello,

      I am creating a RSS Feed application based on a data, and I have the following:

       

                      public function updateArrayList(list:ArrayCollection):ArrayCollection {
                              trace(list);
                              for(var i:int = 0; i < list.length; i++) {
                              //      Alert.show(list.getItemAt(i).condition);
                                      getRSSUpdate(list.getItemAt(i).condition);
                                      list.getItemAt(i).title = getRSS.lastResult.article.title;
                              }
                              return list;
                      }
      
                      public function getRSSUpdate(condition:String):void {
                              getRSS = new HTTPService();
                              getRSSParam = new Object;
                              getRSSParam.condition = condition;
                              getRSS.method = "POST";
                              getRSS.url = "http://localhost/site/remoteRequests/flash/rss/getRSS.php";
                              getRSS.send(getRSSParam);
                      }
      
      

      Basically, I want to iterate through the list ArrayCollection, and update list.getItemAt(i).title with result passed from the HTTPService.

      This doesn't work! Help!