Looks like your problem is in the first line, reading the data back from the service var bigCollection:ArrayCollection = data.result.myBigList as ArrayCollection; //I am reading an xml file.
If you're hitting a service that has the result format as "E4X" you'll actually be getting an XML object back that you can dot down through so var serviceResults:XML = data.result as XML; then you can used the methods and properties of the XML class to get the data you need. --- In [email protected], "Nayan Savla" <[EMAIL PROTECTED]> wrote: > > Hi All, > > I am trying to get data from an ArrayCollection and i tried various > things without any luck. > > this is the code, > > var bigCollection:ArrayCollection = data.result.myBigList as > ArrayCollection; //I am reading an xml file. > > 1) var smallCollection:ArrayCollection = > bigCollection.getItemAt(0,10); //i believe this is the correct method > but doesn't work > > 2) var smallCollection:ArrayCollection = > bigCollection.toArray().slice(0,10) as ArrayCollection; //this returns > null > > 3) var smallCollection:Array = bigCollection.toArray().slice(0,10); > //this works just fine. > > any ideas why i can't just use the second statement, please ignore my > knowledge of flex if i am missing something fundamental. > > thanks > Nayan >

