# Create random neg/pos numbers?

**URL:** <https://forum.kirupa.com/t/create-random-neg-pos-numbers/226912>\
**Category:** flash\
**Created:** [May 25, 2007, 12:43am UTC](https://forum.kirupa.com/t/create-random-neg-pos-numbers/226912 "2007-05-25T00:43:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![boomtish](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@boomtish](https://forum.kirupa.com/u/boomtish)\
**Post date:** [May 25, 2007, 12:43am UTC](https://forum.kirupa.com/t/create-random-neg-pos-numbers/226912/1 "2007-05-25T00:43:27Z")

</div>

Hi

I need some actionscript that will give me a random number between -50 and 50. Been looking at it for a while now. Anyone got any ideas/solutions?

The main thing is, I need to create a random value which could be a neg or a positive number, on every frame. So far I can create a random value, but can’t get it to be neg one frame and positive the next.

Please help. Cheers
