Chaotic Horde

Flash Applications and Games Development

Admin wrote: 

Hi Guys!
I’m ripping my hair out over this one, so if anyone could shout some suggestions my wy I’d be forever in your debt!
Basically I’ve been building a web based order form and my client want the ability to add items (as many as you want) and for them to be totalled up.
I’ve used Kirupas Scrollpane with Dynamic Mc’s tutorial to add my products, but I can’t seem to add them up!
Each product adds up it’s subtotal in the dynamically attached Mc and outputs the variable ’subtotal’
In my root I have this function to call the subtotals, but I can’t seem to get it to add up each of them to output a total…
Any suggestions ?

Here’s my add up function

Code:

valued_btn.onRelease = function() {
if (i != 0) {
i++;
var total:Number = scrollPane.spContentHolder["form"+i].tag.subtotal;
trace(total);
}
};


Any help would be amazing :)

Liam


(Link)

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • Furl
  • StumbleUpon

Posted in Flash Application and Games Development |

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.