# Converting a string into a usable integer/number

**URL:** https://forum.kirupa.com/t/converting-a-string-into-a-usable-integer-number/282257
**Category:** flash
**Created:** [February 19, 2009, 1:33pm UTC](https://forum.kirupa.com/t/converting-a-string-into-a-usable-integer-number/282257 "2009-02-19T13:33:35Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Drew91](https://avatars.discourse-cdn.com/v4/letter/d/35a633/32.png) [@Drew91](https://forum.kirupa.com/u/Drew91)
#### Post date: [February 19, 2009, 1:33pm UTC](https://forum.kirupa.com/t/converting-a-string-into-a-usable-integer-number/282257/1 "2009-02-19T13:33:35Z")

</div>

I’ve got a .txt file hosted on a freewebs, which my actionscript gets some variables for (for easy updating of statistics).

I want to do be able to do math in actionscript with these numbers I’m calling up from the .txt file, but the problem is that when I call up the variables, they are recognized as a string, instead of integers.

How would I convert the string to an integer in actionscript, or write the number in the .txt so that it’s recognized as an integer.
