# \[Flash8\] How to increase number with decimals?

**URL:** <https://forum.kirupa.com/t/flash8-how-to-increase-number-with-decimals/331321>\
**Category:** flash\
**Created:** [July 6, 2013, 2:44pm UTC](https://forum.kirupa.com/t/flash8-how-to-increase-number-with-decimals/331321 "2013-07-06T14:44:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ooomega](https://avatars.discourse-cdn.com/v4/letter/o/85f322/32.png) [@Ooomega](https://forum.kirupa.com/u/Ooomega)\
**Post date:** [July 6, 2013, 2:44pm UTC](https://forum.kirupa.com/t/flash8-how-to-increase-number-with-decimals/331321/1 "2013-07-06T14:44:33Z")

</div>

Hi guys,  
I’m new with action script so I’m really sorry if my question sounds silly ^^;

I’m trying to find a script to increase number from 0.00 to 999.99. When I searched online, this script works for me:

```auto
timer_txt.text = 0; // start time

function timer(){
    Number(timer_txt.text++);
    if(Number(timer_txt.text == 999)){
        clearInterval(myTimer);
        trace("finished");
    }
}

myTimer = setInterval(timer, 10); // 1000 milliseconds = 1 second
// so the textfield is decreased by 1, every second

```

Unfortunately, when I tried to put decimals on any number the script stopped to work (e.g timer\_txt.text = 0.00; or if(Number(timer\_txt.text == 999.99)). When I tried to make the increasement in decimals, it refuses to work as well (Number(timer\_txt.text=timer\_txt.text+0.55); )

What can I do to make the number increase in decimals? And is it possible to control the increasement? (say +0.55 on every second). I have attached my .fla file if it helps.

Thank you for taking your time to read this post! Any help will be very much appreciated.
