# Count up with xml value?

**URL:** <https://forum.kirupa.com/t/count-up-with-xml-value/314975>\
**Category:** Uncategorized\
**Created:** [October 13, 2010, 11:04pm UTC](https://forum.kirupa.com/t/count-up-with-xml-value/314975 "2010-10-13T23:04:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sempase](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@sempase](https://forum.kirupa.com/u/sempase)\
**Post date:** [October 13, 2010, 11:04pm UTC](https://forum.kirupa.com/t/count-up-with-xml-value/314975/1 "2010-10-13T23:04:32Z")

</div>

Hi Everybody,

I have a problem with xml, i’m getting a value from xml file, for example “1000”. Here is the code

```auto
var my_xml = new XML ();
my_xml.ignoreWhite = true;
my_xml.load ("data.xml");
my_xml.onLoad = function (success)
{
if (success)
show_txt.text = this.firstChild.childNodes[0];
}

```

How can i add +1 in every four seconds? i tried with this code but it doesnt work.

Example count up code

```auto
var curcount:Number = 1000000;
var maxcount:Number = 6000000000000;
var increment:Number = 1;

txt.autoSize = true;

var si:Number = setInterval(function ()
{
(curcount >= maxcount) ? clearInterval(si) : curcount += increment;
txt.text = String(curcount);
}, 1000);

```

Thanks
