5 Replies Latest reply on Nov 17, 2006 9:57 AM by ntsiii

    How to loop thru a List to get all SelectedItems?

    Like2Flex Level 1
      Here is my code, but the loop is returning all the items (both selected and un-deselected items)

      lstMarks in my ListBox.
      var markslist:String;

      for (var i:int = 0; i < marks.length ; i++) {
      markslist = markslist += "," + lstMarks.selectedItem.mymarks;
      text1.text = markslist;
      }

      Can somebody help. I need to get only the selecteditems in the comma delimited string.

      Thx