ActionScript 1/2 :: Creating Mortgage Calculator - Doesn't Add Up
Mar 29, 2010[URL] Here is the flash file, I feel as if I am almost there, but the calculation doesn't add up.
[Code]...
[URL] Here is the flash file, I feel as if I am almost there, but the calculation doesn't add up.
[Code]...
I am currently trying to design a Savings calculator for my client's website (in Flash CS3). This is my 'trying to learn Flash' project so to speak.I have attached a jpeg of the calculator I have designed (and noted the inputs and outputs FYI).
Below is the actionscript so far - please bear in mind that I have sourced some of this code from researching online, and most of it I know is incorrect but I have included it to show what the calculations for the boxes should be. Anything online on Flash calculations seems too simple to apply to what I'm doing. I read that my Calculate button should be a 'Button' but I then read elsewhere that I should choose my button from Components-User Interface-Button but it's properties say that it's a 'Movie Clip'. And I'm clueless as to how to modify this to look like my button design.
Code:
var num:Number;
function Calc() {
num1 = Input1_txt.text;[code].....
I refer to this tutorial: [URL]
i'm creating a calculator similar to the one Kirupa creates on the first page. I think I've just about got my head around calling functions, but I want the calculation output text box (text_answer) to change dynamically, as you change the values in the variable text boxes. i.e. I don't want to have to hit the submit button each time the values are changed.
how would I go about making a change to the code to do this? I've tried lots of methods but seem to be going round in circles on something that must surely be pretty simple..
im trying to make a simple BMI (Body Mass Index) Calculator but it doesn't seem to be working
my code is:
on (release) { BMI_SUM = (Number(WEIGHT_INPUT.text) / Number(HEIGHT_INPUT.text * HEIGHT_INPUT.text)); _root.BMI_FINAL.text = BMI_SUM; }
the BMI_FINAL.text box always displays NaN, and when traced it says Undefined and the code looks sound but i cant get it to work.
how to get mortgage interest rates, such as the ones on Is it possible to somehow retrieve the interst rates from that site, get them to display in a dynamic text box on my flash movie and have those numbers update as they are updated
View 5 RepliesFor some reason, in the past few days, the auto complete feature doesn't work well when I'm creating a new class file. I'm trying to write a new class which uses away3D, and even though the auto-complete works well when I start a new AS3 file, it just doesn't work as far as away3D is concerned when I try to create a new AS3 Class file. Other features of the auto-complete don't work as well, for some reason.
View 1 RepliesI am working through an audio player demonstration in the book "Foundation Actionscript 3.0". When I try to publish my AudioDemo_final.FLA file I get the following error, "Adobe Flash CS3 - Error creating flash movie file. Destination directory does not exist. Change your publish settings."The following is displayed in my output panel >> Error opening URL 'file:///C|/Sites/flashcoder.net/FAS3/Audio/AudioDemo%5Ffinal.swf'My file directory is set up like this:AudioDemo_final.flasong1.mp3com.fas3.smc (folder)Main.asSounds.as
I'm trying to put together a simple calculator form, all it needs is the quantity, the price, and a price total.
View 3 RepliesI need to create a calculator (url...) were you can enter in cost in one box and automaticaly it calculates 30% and displays that figure in a total box.
I know a fair amount of action script 2 but now this has to be done in ac3 and I'm very lost.I've tried doesn't seem to work correctly in AC2 or AC3.
I have a BMI calculator that is currently working well, however when calculated, gives a VERY precise result of:Your BMI is: 24.343121332458201.I'd like it to round up/down so it just displays:[code]
View 2 RepliesLooking for a readymade flash calculator.I need that as a movie clip.
View 1 RepliesI am working a calculator with a textfield. It can calculate a if a enter only one number, but when I try to enter two or three doesnt work. I have test several codes but they are not working at all.
var numeroEntrado = "";
var campoUno:int = 125;var campoDos:int = 20;var elResultado1 = 0;var elResultado2 = 0;
proteinas.text = "125 grs.";colesterol.text = "20 mml.";colesterol.backgroundColor = 0x9999FF;textoColesterol.backgroundColor = 0x9999FF;
numeroPorciones.maxChars = 3;numeroPorciones.restrict = "0-9";
btn.addEventListener(MouseEvent.MOUSE_UP, suma);
[Code] .....
I need to use the ComboCox component within a calculator.
I need to combobox data value to be populated by an input text field on the stage.
Basically depending on which of the choices they select from the dropdown menu the calculation made will be made using one of several previously input numbers by the user.
i'm trying to create a roi calculator using two combo boxes. Box 1 how many treatments 5,10,20 Box 2 cost per treatment 90, 100, 120 then button to calculate treatment x cost and a dynamic text field to display result. I am using Flash CS4, am I wasting my time with combo boxes I have searched flsh docs all day.
View 3 RepliesMake changes to the MakeChange.fla application, such that the user enters in the amount of change. The program calculates the number of coins necessary to make change for an amount less than 100 cents. The program should have variables for the amount, number of quarters, number of dimes, number of nickels, and number of pennies. Display all of the information clearly in the output of the program.
View 4 RepliesI'm trying to get a Profit and Loss calculator working in ActionScript 2.The red text in the yellow highlighted cells is what the user can change. They click a calculate button and the number of total value for lemons * Unit cost is supposed to be updated.[code]When the calculate button is pressed
View 2 RepliesI need a calculator for a flex app I am making, and was wondering if there was any official widget prebuilt or already in good quality. I could make one myself but it would be nice to use one that already existed and had a nice api to customize it with.
View 1 RepliesNeed pointers from the good folks here. I need to create an interface illustrated in the link below:
Calculator-like interface (GIF)Scenario 1) When the user clicks either the button 30 or 60, it will update dynamic textfield (value1) with the corresponding value 2) When the user clicks either the button 45 or 73, it will update dynamic textfield (value2) with the corresponding value
3) Dynamic textfield (output) will dynamically add the values of 'value1' and 'value2' and generate the total.
How do I go about scripting the interface?
I have a BMI calculator that is currently working well, however when calculated, gives a VERY precise result of:Your BMI is: 24.343121332458201I'd like it to round up/down so it just displays:Your BMI is: 24.3
Code:
var totalHeight:Number;
var totalHeightx2:Number;
[code].....
I am trying to create a script, where the user inputs a maths equation (something simple like 5 + 2 * 10), I have managed to break down the text into an array and have the numbers in one array and the symbols in another, I wanted the computer to then work it out, however I cant seem to think of how to do this and the methods that I have tried have failed.So there is one dynamic box and the value of that is then broken down by an array split(" "), however this leaves the values in an array and it is percieved as a string not a number and so when i try to work it out
View 1 RepliesLooking for a readymade flash calculator. Any body has done before or willing to do a simple flash calculator.I need that as a movie clip.
View 6 RepliesI was thinking of developing a free online calculator in flash. It would be a standard calculator with basic functions like "+", "-", "*" etc. and an advanced calculator with more functions which would be similar to the scientific pocket calculator.
And I have a dilemma regarding the standard calculator. It's about the way it does the calculations. How would you expect a basic calculator (not an advanced one) to calculate this expression: 1+2*3 equals 7 or 9? On paper the result is clearly 7 but basic pocket calculator calculates the expression in line, unaware of the higher priority operators and give you 9 as a result to the expression above.
In the advanced version of the online flash calculator this expression would equal 7 but I have doubts about what people expect from a basic calculator.
I need to know to create a calculator. By the way I'm using Flash 8 pro.
View 9 RepliesIs there a simple way of pressing a button on a flash calculator to calculate the square root (sqrt)? I cant find anything about it. for example
Code:
// Tangent of the angle in degree
function Dotan () {
if (display == 90) {
display = "Infinity";
[code]....
I was thinking of developing a free online calculator in flash.It would be a standard calculator with basic functions like "+", "-", "*" etc. and an advanced calculator with more functions which would be similar to the scientific pocket calculator.And I have a dilemma regarding the standard calculator. It's about the way it does the calculations.How would you expect a basic calculator (not an advanced one) to calculate this expression:1+2*3 equals 7 or 9?
On paper the result is clearly 7 but basic pocket calculator calculates the expression in line, unaware of the higher priority operators and give you 9 as a result to the expression above.In the advanced version of the online flash calculator this expression would equal 7 but I have doubts about what people expect from a basic calculator.
I'm in a Web Design class and atm, I'm working on chapter 8 of Flash CS5 case problem.I have to make a calculator. Can I just say that AS3 makes me frusterated? D:Anyway, after I finished what the book told me to do whilst getting confused in some areas, I got many compiler errors. I managed to get rid of them but in the end, my calculator isn't working, haha.
Here's the whole code:
import flash.events.MouseEvent;
calcTotal_btn.addEventListener(MouseEvent.CLICK, calculateTourCost);
function calculateTourCost(event:MouseEvent):void {
[code]....
How to create a decent calculator in actionscript 2. I was hoping to create on with, just one input box and the user could put something like 5 * 2 + 10 - 2, in the input box and then the computer would be able to work it out.
View 2 RepliesI followed an online tutorial and built an AS3 calculator for Flash. Works great, and I even figured out how to modify the code to add a clear button. The one issue is that, the way this is coded, one can only enter positive integers or zero (i.e. 0, 1, 2, 3...) into the boxes (num1 and num2 in the code below). As in code below (lines 15-16), the tutorial suggests a clever code so that users won't be able to enter anything (e.g. letters) except numbers into the num1 and num2 boxes (restrict = "0-9").
The result is that one cannot enter a decimal place, and also that one cannot enter a negative number. How to modify the code below to allow decimal places and negative numbers to be entered in the num1 and num2 boxes? I suspect that another conflict in the code with this plan could be the "parseInt" statements near the bottom. I have posted the swf FYI at [URL].
ActionScript Code:
plus_btn.addEventListener(MouseEvent.CLICK, plusClick);
minus_btn.addEventListener(MouseEvent.CLICK, minusClick);
times_btn.addEventListener(MouseEvent.CLICK, timesClick);
divide_btn.addEventListener(MouseEvent.CLICK, divideClick);
equal_btn.addEventListener(MouseEvent.CLICK, equClick);
clear_btn.addEventListener(MouseEvent.CLICK, clearClick);
[Code] .....
I have a simple php calculator when users enter length and width of a room and the result is displayed (the square area).I'd like to do the same thing with a flash sliding calculator.basic tutorial for a sliding calculator using Flash CS 3/4 and AS3?
View 7 RepliesI have a list of items inside arrays containing names and prices. I want when i click a button it should go into ARRAY1 grab the name, then ARRAY2 grab the price and put it in a container box. If i click the same button again it should update the quantity field. Take a look at the image below. [URL]
Im trying to use a parent child system where when i click the button, it adds a movie clip child that contains 3 dynamic fields, to the main container and populates these fields with quantity based on how many times i click button 1 and then the name and the price will be multiplied by the quantity. If i click button 2 the same process repeats and at the end it shows the total of all items in the list.