public var streamList:ArrayCollection=new ArrayCollection();
//am getting the streamList dynamically like WebUser7,WebUser11.....
private function streamSynch(event:SyncEvent):void
{
if(streamList.length>0){
//(streamList)here in streamList am getting the all values(old)
streamList.removeAll();
}
var results:Object = event.target.data;
for( var item:String in results ) {
streamArray.push(item);
}
streams = new ArrayCollection(streamArray);
streamList=streams; //(streamList)here in streamList am getting the all values(new) like Webuser9,WebUser2,WebUser11......
From my Example i need to add the Webuser9,WebUser2,WebUser11,WebUser7
}
I need to compare the old and new,and then replace the old and add the new…
You can do this by using
ArrayCollectionmethodsetItemAt(item:Object, index:int):Object. You just have to know an index of element you want to replace.EDIT:
There is usage example