# How to detect where the MC is coming from?

**URL:** https://forum.kirupa.com/t/how-to-detect-where-the-mc-is-coming-from/331903
**Category:** flash
**Created:** [November 21, 2013, 5:12pm UTC](https://forum.kirupa.com/t/how-to-detect-where-the-mc-is-coming-from/331903 "2013-11-21T17:12:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![pistelli](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@pistelli](https://forum.kirupa.com/u/pistelli)
#### Post date: [November 21, 2013, 5:12pm UTC](https://forum.kirupa.com/t/how-to-detect-where-the-mc-is-coming-from/331903/1 "2013-11-21T17:12:09Z")

</div>

Hi!  
I’ll try to explain my problem in a simple way:  
I have a ball going from left to right or from right to left of stage. When this ball hits a MC positioned in the center of stage,  
I have 2 options:

1. If the ball is coming from right side it goes up. (-y)
2. if it’s coming from left side it goes down (+y)  
Question is: How do I detect what side the ball is coming from?  
Any help please?  
Thanks.
