Hi guys, I’m new to this forum and I might say, this forum looks great…
I am not really familiar in the mathematical here in AS3, I want to make a calculator with fixed number to add to an input text field…
Here is what I got so far:
invest_btn.addEventListener(MouseEvent.CLICK,investClick);
numA.restrict = “0-9’”;
var input1:String;
var totalRes:Number;
var input2 = 10;
function investClick(event:MouseEvent):void{
totalRes = parseInt(input1) + Number(input2);
totalRes.toString();
total_txt.text = String(totalRes);
}
I got an input text field called numA and a dynamic text field called total_txt…
Just want to add whatever people input in the input field with 10, keep getting NaN as a result…
Thx guys for the help…