Re: [flexcoders] Re: getting the total of values of an array collection that is updated manually

Tuesday, December 06, 2011

 

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 <stinasius@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?
> >
> >
> >
>



__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

0 comments:

Post a Comment