A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Need help with AS3 calculator!!!!

  1. #1
    Junior Member
    Join Date
    Jan 2009
    Posts
    1

    Angry Need help with AS3 calculator!!!!

    I have an AS3 Calculator that I have created and works great just like a regular calculator should. However, I am currently working on a calorie calculator and need the number in the screen where the numbers appear to start at lets say 1000 and have the calculator only be able to subtract from that total. For example, you get to the calculator and it says 1000 on the top part of the calculator and then user will enter a number and whatever the number is will subtract from 1000. For some reason I just can't figure it out. I am fairly new to the whole action script thing so I'm looking for anything I can get as far as suggestions and help. So hopefully someone can shoot me a line

    Thanks in advance for any help I can get

  2. #2
    Senior Member jweeks123's Avatar
    Join Date
    Mar 2006
    Posts
    1,124
    Set up a number variable of 1000 to start with. Populate your textfield with that number to start: i.E.

    var startNum:Number = 1000;

    calTextField.text = String(startNum);

    And the rest I need a bit more info.

    When the user enters a number, how is it stored? Do they see it, or what happens. Is a button clicked, or what?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center