1 Reply Latest reply on Nov 12, 2010 5:55 AM by jfb00

    How to remove elements from arraycollection and add them to it

    srini_7206

      Hi,

      I am plotting  two types of bubbles normal and comparison based on arraycollection data.The arraycollection is collection of dataPointVo which is  value object.

      In run time I am adding comparion bubbles  by assigning them as

      dataPointVo.isComparison=true.

      actechnology.addItem(dataPointVo);

       

      for each(var dVo:dataPointVo in    actechnology){

       

      if(dVo.isComparison){

        var ellipse:Ellipse=new Ellispe();

           ellipse.fill=0xcccccc;

           -------------------

              -----------------------

      }else{

                ellipse.fill=0xff0000;

      }

         

      group.addElement(ellipse);

      }

       

      in another function i am removing elements as

      for each(var dVo:dataPointVo in    actechnology){

       

      if(dVo.isComparison){

       

      actechnology.removeItem(dVo)

       

      group.removeElement(ellipse);

      }

       

      But the removed elements are not actually removed.The plotted bubbles are still visible.

      When I debug actechnology contains the removed elements.Why this is happening .What is going wrong with me.Any help is appreciated.

      Thanks

      Srini