2 Replies Latest reply on Nov 20, 2006 1:45 PM by

    dynamically increase a number?

      Lets say I have a dynamic text box with the following text in it - $1000 and I want to dynamically increase that number to $2000 by clicking a button while actually displaying the increase. i.e. $1001 $1002 etc. etc.

      Any thoughts on how to do this?
        • 1. Re: dynamically increase a number?
          tiago.braga Level 1
          In this case, you have to define how is the unit scale. Maybe putting a varible as same as in the code.

          // action in the button
          var unitValue: Number = 1000;
          textfield.text = Number(textfield.text) + unitValue;

          Tiago Braga
          • 2. Re: dynamically increase a number?

            Works perfectly but what I am really looking for is actually showing the increase of that number (as an animation) instead of it instantly adding the number. I want to see the number increase by 1000. i.e. 1001, 1002, 1003, 1004, ..... 2000

            I know I could animated this but I want it to be dynamic because the number will change