private function updateTotal(){ var summ:Number=0 for(i:String in orderColl){ summ+=orderColl[i] } total=summ sum.text=total }
and call this function at the end of init, addProduct, deleteOrder functions. On Tue, Dec 6, 2011 at 4:19 AM, ZIONIST <stinas...@yahoo.com> wrote: > > Tried that but it doesn't work. What am trying to do is to get the total > price updated as new objects are added to the arraycollection that > populates the list and also when the qty is changed the total updates too. > could some one please help me. > > --- In flexcoders@yahoogroups.com, Csomák Gábor <csomakk@...> wrote: > > > > if i get your problem right, this will help. however, i didn't match the > > name of the arraycollection to yours > > > > var sum:Number=0 > > for(i:String in arraycollectionvar){ > > sum+=arraycollectionvar[i]; > > } > > //here is the sum you need. > > > > On Mon, Dec 5, 2011 at 3:57 PM, ZIONIST <stinasius@...> wrote: > > > > > > > > > > > anyone with an example similar to wht am trying to do? > > > > > > > > > > > > > > >