[AS2]Complex calculator

hi there, this is my first time post :stuck_out_tongue:
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?

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:
amount range: $1 - $100
interest rate = 2%/year

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

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