3 Replies Latest reply on Oct 17, 2007 12:25 PM by micha_y

    arraycollection changing problem

      i have the following variable defenition:

      [Bindable] private var rangeData:ArrayCollection = new ArrayCollection();

      and i wish to silce it, and then update only the sliced data, which i do like that:

      var SyncRangeData:ArrayCollection = new ArrayCollection();

      SyncRangeData.source = rangeData.source.slice( x1, x2 );
      some changes to SyncRangeData

      but, as i noticed, when changing the SyncRangeData, it also changes the rangeData.

      how can i copy from rangeData to another variable [SyncRangeData], and then change it without affecting the original variable [rangeData ].

      thanks in advance!