1 Reply Latest reply on Sep 8, 2009 10:18 AM by Flex harUI

    how to mention the array index to the arraycollection

    sathiyabala Level 1

      hai

       

       

              Can any one help me for this problem, i need to mention the array index to the array collection for a slider move..

            

              i have done in this way, below is the code...

       

               i am not getting the solution by this code.

       

               Emergency pl

       

              Thanks in advance....

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

      private

       

       

       

       

       

       

       

       

      function sliderChangeEvent(event:SliderEvent):void

      {

       

       

       

       

      var

       

       

       

       

       

       

      i:int;

       

       

       

       

      var

       

       

       

       

       

       

       

       

      selectedAuditSummaryRows:String = ""

      ;

       

       

       

       

      var

       

       

       

       

       

       

       

       

      selectedvalues:String = ""

      ;

       

       

       

       

      var

       

       

       

       

       

       

       

      parentnode:String = tree1.selectedItem.parent().@label.toString();

       

       

       

       

      var

       

       

       

       

       

       

       

      node:String = tree1.selectedItem.@label.toString();

       

       

       

       

      var

       

       

       

       

       

       

       

      selectedArray:Array = auditsummary.selectedItems;

       

       

       

       

      var

       

       

       

       

       

       

       

       

      orderDefaultSummary:ArrayCollection = new

      ArrayCollection();

       

       

       

       

      for

       

       

       

       

       

       

      (i=0; i<selectedArray.length; i++){

       

       

       

       

       

      if(selectedArray[i].Audit == "HIGH"

      ) {

      orderDefaultSummary.addItemAt(selectedArray[i].Audit+

       

       

       

      "="

      +selectedArray[i].Count, 0);

       

       

       

       

       

      }

       

       

       

       

      else if(selectedArray[i].Audit == "MEDIUM"

      ) {

      orderDefaultSummary.addItemAt(selectedArray[i].Audit+

       

       

       

      "="

      +selectedArray[i].Count, 1);

       

       

       

       

       

      }

       

       

       

       

      else if(selectedArray[i].Audit == "LOW"

      ) {

      orderDefaultSummary.addItemAt(selectedArray[i].Audit+"="+selectedArray[i].Count, 2);

       

       

       

       

       

      }

       

      }

       

       

       

       

      if

       

       

       

       

       

       

       

      (orderDefaultSummary.length > 0){

      selectedAuditSummaryRows = orderDefaultSummary.getItemAt(0)+

       

       

       

       

      ","+orderDefaultSummary.getItemAt(1)+","+orderDefaultSummary.getItemAt(2) as

      String

      }

       

       

       

       

      if

       

       

       

       

       

       

       

      (selectedArray.length == 0){

      nodata.visible =

       

       

       

       

      true

      ;

      datecomp.visible =

       

       

       

       

      false

      ;

       

       

       

       

      }

       

       

       

      complianceQuery = ComplianceDisplaySubmit();

       

      var

       

       

       

       

       

       

       

      sliderval:int = (dayslider.value);

       

       

       

       

       

       

      var parameters:Object = {selectedvalues:complianceQuery, parentNode:parentnode, folderID:node, displayDate:sliderval, selectedauditRow:selectedAuditSummaryRows, FlexActionType:"DRAGSLIDER"

      treeListClick.send(parameters);

       

      CursorManager.setBusyCursor();

       

       

      }