# Detect object stop with x & y

**URL:** https://forum.kirupa.com/t/detect-object-stop-with-x-y/158884
**Category:** flash
**Created:** [August 12, 2005, 2:33pm UTC](https://forum.kirupa.com/t/detect-object-stop-with-x-y/158884 "2005-08-12T14:33:45Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![onemhunki](https://avatars.discourse-cdn.com/v4/letter/o/c57346/32.png) [@onemhunki](https://forum.kirupa.com/u/onemhunki)
#### Post date: [August 12, 2005, 2:33pm UTC](https://forum.kirupa.com/t/detect-object-stop-with-x-y/158884/1 "2005-08-12T14:33:45Z")

</div>

Folks,

I’m trying to detect when an object (a golf ball) in my game stops bouncing. I need to track it’s x and y position and tell when they both equal a set figure (the hole) a hitTest wasn’t working as it was detecting each ball bounce not when it stopped rolling. So when the x and y both equal a figure. I’m not sure of the two operators needed to get this figure, can anyone help.

if ((this.\_x = -106.5) && (this 47.55)){  
\_root.cheer.play();  
}

This doesn’t seem to work.

Cheers all

Munki
