Tutorials Home
What's New
Top Rated
Submit
myTutes
Random!
Creating a mortgage calculator in Flash MX
Author: Sas Jacobs
| Website: http://www.sasjacobs.com |
Calculations
The actionscript goes on frame 2 of the actions layer .It calcuates the mortage
repayment. I don't want to confuse matters with explaining how the mortgage
calculations work. I'm not sure that I understand it myself!!
//calculate interest rate applicable to period
var periodicInterestRate = floInterest/intRepayments/100;
//length in periods
var TotPeriods = intTerm * intRepayments;
//periodic interest
var PeriodicInterest = intPrincipal * periodicInterestRate;
var base = 1;
var mbase = 1 + periodicInterestRate;
for (var i=0; i
base = base * mbase;
}
//calculate Total Repayment
TotRepayment = floor(intPrincipal * periodicInterestRate / ( 1 - (1/base)));
Test the movie. Enter some figures and test the calculation.
| » Level Intermediate |
|
|
Added: : 2002-08-07
Rating: 1463.47 Votes: 45
Hits: 1255
|
| » Author |
|
Applications Developer
Marconi Australia
|
| » Download |
|
Download the files used in this tutorial.
|
|
Download (106 kb)
|
|
Get conversion and unzipping tools
for PC and Mac here!
|
| » Forums |
|
More help? Search our boards for quick answers!
|
|
Please rate this tutorial, 10 is the top rating, you can also click the
comments link to read/write a review.
|
|
|