# \[AS2\]Complex calculator

**URL:** <https://forum.kirupa.com/t/as2-complex-calculator/289191>\
**Category:** flash\
**Created:** [May 27, 2009, 12:01pm UTC](https://forum.kirupa.com/t/as2-complex-calculator/289191 "2009-05-27T12:01:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yorren](https://avatars.discourse-cdn.com/v4/letter/y/6de8d8/32.png) [@yorren](https://forum.kirupa.com/u/yorren)\
**Post date:** [May 27, 2009, 12:01pm UTC](https://forum.kirupa.com/t/as2-complex-calculator/289191/1 "2009-05-27T12:01:58Z")

</div>

hi there, this is my first time post 😛  
actually I’m doing a small project for my client to make a simulation using flash, but I got a limited knowledge with action script. and my friend suggested to ask the masters from this forum :hugegrin:

can somebody please help me to solve this problem?

**Condition:**  
what we want to find is the interest that the customer will got from the amount of money they put in the account

so the variable will be:  
amount of money (that will be typed in)  
Interest rate (interest rate will be based on the range of money)  
amount range  
number of days the money stay in the account

what we looking for is:  
amount of interest (yearly)  
\*\*  
the formula\*\*  
(money amount x interest rate x number of days) / 360

**the problem**  
the problem here is the interest rate is different for each amount range  
for example:  
[INDENT] **range1**  
amount range: $1 - $100  
interest rate = 2%/year

**range2**  
amount range: $101 - $300  
interest rate: 2.5%/year

[/INDENT] **Question:**  
my question is how to tell flash to pick the range from the amount of money that I typed in the input text box, so flash can calculate with the interest rate based on the amount of money that I typed.

thanks a lot guys  
cheers,

Yorren
