# Maths in AS2

**URL:** <https://forum.kirupa.com/t/maths-in-as2/300975>\
**Category:** flash\
**Created:** [December 1, 2009, 6:05pm UTC](https://forum.kirupa.com/t/maths-in-as2/300975 "2009-12-01T18:05:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbitkill](https://avatars.discourse-cdn.com/v4/letter/j/85e7bf/32.png) [@jbitkill](https://forum.kirupa.com/u/jbitkill)\
**Post date:** [December 1, 2009, 6:05pm UTC](https://forum.kirupa.com/t/maths-in-as2/300975/1 "2009-12-01T18:05:02Z")

</div>

Hi!

How to do math calculations in AS2? I only need + and -. Aswell, how to choose a random number inbetween 2 and 6 and put in a variable form.

After this, I need to do a calculation like:

```auto
"currenthealth" - "random"

```

Thanks  
jbitkill :?)
