# An item that costs more, the more you buy it

**URL:** <https://forum.kirupa.com/t/an-item-that-costs-more-the-more-you-buy-it/245392>\
**Category:** flash\
**Created:** [November 29, 2007, 9:29am UTC](https://forum.kirupa.com/t/an-item-that-costs-more-the-more-you-buy-it/245392 "2007-11-29T09:29:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomeron](https://avatars.discourse-cdn.com/v4/letter/t/a88e57/32.png) [@Tomeron](https://forum.kirupa.com/u/Tomeron)\
**Post date:** [November 29, 2007, 9:29am UTC](https://forum.kirupa.com/t/an-item-that-costs-more-the-more-you-buy-it/245392/1 "2007-11-29T09:29:16Z")

</div>

Hey everyone,

I’m making a little game, and, well, long story short - you have money in it, and with that money you can buy upgrades, that can help you get EVEN MORE money, like a lot of games today.  
I want to do, so that each time you buy an upgrade, the next upgrade will cost more.  
My question is how can I do it? Do I have to manually write down each upgrade cost, or can I use some kind of mathematical equation that’ll automatically do it?

Note that I just started Flash, and my ActionScript is very, very weak. I know just basic commands, so if you can, please include a script and explain to me what it does, so I can learn from the future 🙂

Also, I have Flash CS3 but I created an ActionScript 2.0 document. If you can’t help me with AS2, but only with AS3 it’s ok, I’ll handle it.

Thanks a lot !!! 🙂  
Tomeron.
