# How to check a mc's \_x & \_y in a range?

**URL:** <https://forum.kirupa.com/t/how-to-check-a-mcs--x--y-in-a-range/64696>\
**Category:** Uncategorized\
**Created:** [September 18, 2004, 11:56pm UTC](https://forum.kirupa.com/t/how-to-check-a-mcs--x--y-in-a-range/64696 "2004-09-18T23:56:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RedSox](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@RedSox](https://forum.kirupa.com/u/RedSox)\
**Post date:** [September 18, 2004, 11:56pm UTC](https://forum.kirupa.com/t/how-to-check-a-mcs--x--y-in-a-range/64696/1 "2004-09-18T23:56:28Z")

</div>

I’d like to check if a mc’s \_x and \_y properties are between a certain range, but can’t find out how to. Now that I’m typing this (I can’t check it in Flash right now at the moment), I’m thinking if this will work:

let’s say the mc is called mcMyMovie and it has to be between 90 & 100 (both for x and y)

if(mcMyMovie.\_x =\< 100 && mcMyMovie.\_x =\>90 && mcMyMovie.\_y =\<100 && mcMyMovie.\_y =\>90) {

}

Would this work or is there a shorter way to write this down in code ? In maths I’d write something like 90 \< mcMyMovie.\_x \<100.

Thanks! 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 19, 2004, 1:10pm UTC](https://forum.kirupa.com/t/how-to-check-a-mcs--x--y-in-a-range/64696/2 "2004-09-19T13:10:28Z")

</div>

That code should work, but no, as far as i know there is not an easier way to write that. Ill give ya a yell if i think of sumin.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 19, 2004, 1:30pm UTC](https://forum.kirupa.com/t/how-to-check-a-mcs--x--y-in-a-range/64696/3 "2004-09-19T13:30:28Z")

</div>

thanks very much, I’ll give it a go 🙂
