# +/- In Actionscript?

**URL:** <https://forum.kirupa.com/t/in-actionscript/181244>\
**Category:** Uncategorized\
**Created:** [March 7, 2006, 6:38pm UTC](https://forum.kirupa.com/t/in-actionscript/181244 "2006-03-07T18:38:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stereochris](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@stereochris](https://forum.kirupa.com/u/stereochris)\
**Post date:** [March 7, 2006, 6:38pm UTC](https://forum.kirupa.com/t/in-actionscript/181244/1 "2006-03-07T18:38:20Z")

</div>

I’m not really huge on what stuff is called in flash, so if i’m not making any sense let me know.

I need to know if it’s possible to have an action occur if a variable number is within a certain predefined ammount of another variable, positive or negative.

Heres an example. I have an oscillating variable that goes from 1 to 100, then back down to 1, then up to 100 again over and over.

I want an action to occur from the numbers 55 to 65, so 10 times, and I’m looking to write it something like this.

(oscillator +/- 5) \> variable ? doSomething : null;

Does this make any sense?
