
March 18th, 2003, 04:00 PM
|
|
Contributing User
|
|
Join Date: Mar 2003
Location: houston
Posts: 94
Time spent in forums: 8 h 40 m
Reputation Power: 6
|
|
|
math object
I am building a simple calculator and for some reason I can’t figure out I’m getting an extra “0” I have an input text box named “input” with an instance name of “input” I have a dynamic text box named answer with an instance name of “answer” I have a variable with the name of “hold” and I have a button with the code
on(release, keyPress "<Enter>") {
hold = Number(input * .0625);
answer = Number((input + hold) * .1);
}
When I test this by entering the number “10” into the input box and clicking the button it gives me the answer “10.0625”
BTW that * .1 on line three is because without it I get the answer 100.0625
Any ideas what’s going on?
|