Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Simple Calculator help

New Here ,
Apr 30, 2013 Apr 30, 2013

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

TOPICS
ActionScript
517
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 30, 2013 Apr 30, 2013

what do you mean by, "...display the results accordingly"?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 30, 2013 Apr 30, 2013

There are 3 text boxes that would display the result from each equation, it's a product calculator

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 30, 2013 Apr 30, 2013
LATEST

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);

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines