Search tutorials
Functions
We'll need the following functions:
- CalculateRepayment - plays the calculate frame. Later, we'll add validation to this function.
- setRepaymentTerm - sets the value of the intRepayments variable
- StartOver - plays the first frame of the movie
- floor - used to round the repayment to two decimal places
function CalculateRepayment(component) {
gotoAndPlay("calculate");
}
function setRepaymentTerm(component) {
intRepayments = component.getSelectedItem().data;
}
function StartOver() {
gotoAndPlay("start");
}
function floor(number) {
return Math.floor(number*Math.pow(10,2))/Math.pow(10,2);
}
Test the movie. If you click the Calculate button, the second frame should display. Then you can click the New Calculation button to go back to the first frame.
| » Level Intermediate |
|
Added: 2002-08-07 Rating: 4 Votes: 3 |
| » Author |
| Applications Developer Marconi Australia |
| » Download |
| Download the files used in this tutorial. |
| Download (106 kb) |
| » Forums |
| More help? Search our boards for quick answers! |
-
You must have javascript enabled in order to post comments.


Comments
There are no comments yet. Be the first to comment!