Copy link to clipboard
Copied
I need an Action Script code that will take a user input number, and divide it by 3 different numbers and display the results accordnigly. I've tried 4 or 5 different examples but nothing seems to work, please help,
CB
Copy link to clipboard
Copied
what do you mean by, "...display the results accordingly"?
Copy link to clipboard
Copied
There are 3 text boxes that would display the result from each equation, it's a product calculator
Copy link to clipboard
Copied
So I found the answer to my problem and here is the code if anyone else needs it;
function calcClick(event:MouseEvent):void
{
var userNum:Number = Number(userNum.text);
var total_1:Number = userNum / 400;
silRes.text = String(total_1);
var total_2:Number = userNum / 2500;
finishRes.text = String(total_2);
var total_3:Number = userNum / 500;
colorRes.text = String(total_3);
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now