Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8418105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:13:42+00:00 2026-06-10T02:13:42+00:00

public var streamList:ArrayCollection=new ArrayCollection(); //am getting the streamList dynamically like WebUser7,WebUser11….. private function streamSynch(event:SyncEvent):void

  • 0
  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…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T02:13:43+00:00Added an answer on June 10, 2026 at 2:13 am

    You can do this by using ArrayCollection method setItemAt(item:Object, index:int):Object. You just have to know an index of element you want to replace.

    EDIT:

    There is usage example

    function arrayCollectionExample () : void {
    
        // create instance of array collection
        var arrayCollection : ArrayCollection = new ArrayCollection();
    
        // create some object that we will add to collection
        var obj1 : Object = { name : "Object1" };
        var obj2 : Object = { name : "Object2" };
        var obj3 : Object = { name : "Object3" };
    
        // add those objects to collection
        arrayCollection.addItem( obj1 );
        arrayCollection.addItem( obj2 );
        arrayCollection.addItem( obj3 );
    
        // and now let's create a new object that we will want add instead of obj2
        var obj4 : Object = { name : "Object4" };
    
        // lets say that we don't remember that index of obj2 in a collection is "1". We have to get from collection
        var obj2Index : int = arrayCollection.getItemIndex( obj2 );
    
        trace( obj2Index ) // 1
    
        // now when we know index we can replace obj2 with obj4
        arrayCollection.setItemAt( obj4, obj2Index );
    
        // now when we have replaced values we can see that item at index "1" property "name" is "Object4"
        trace( arrayCollection.getItemAt( obj2Index )["name"] ) // "Object4"
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

[Bindable]public var headingData1:Object = new Object(); <mx:HTTPService id=srv url=components.xml resultFormat=object result=getHeadings(event);/> private function getHeadings(evt:ResultEvent):void{
I have something like this: private var myVideo:Video; public var videoDisplay:UIComponent; ... videoDisplay.addChild(myVideo); ...
/* [Bindable] public var rows1:ArrayCollection=new ArrayCollection([ ['Google', [{Projectname:1, Client:0}, {Projectname:2, Client:1}, {Projectname:3, Client:2}, {Projectname:4,
Is there a benifit to using: private var _someProp:String; public function set someProp(value:String):void {
I know I can't write a method like: public var MyMethod() { return new{
private function openAllNodes(event:TimerEvent):void { //Alert.show(event.target.currentCount); var index:int =event.target.currentCount - 1; myTree.openItems = treeData..node[index] ;
private var _product:Product; [Bindable] public function get product():Product { return _product; } public function
I have a signal like this: public var e_collision:Signal = new Signal(GameObj); When the
I have a component that I hand over a function public var func :
If I create an object like so: class Foo { [Bindable] public var property:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.