# Working with hitTest

**URL:** https://forum.kirupa.com/t/working-with-hittest/165626
**Category:** programming
**Created:** [October 12, 2005, 5:37pm UTC](https://forum.kirupa.com/t/working-with-hittest/165626 "2005-10-12T17:37:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Terry\_elekes](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@Terry\_elekes](https://forum.kirupa.com/u/Terry_elekes)
#### Post date: [October 12, 2005, 5:37pm UTC](https://forum.kirupa.com/t/working-with-hittest/165626/1 "2005-10-12T17:37:48Z")

</div>

I am trying to understand the hittest and could use some help. Here is the code i used:on (press) {  
this.startDrag();  
}  
on (release) {  
stopDrag();  
}  
//see if in center of target  
onClipEvent (enterFrame) {  
if (this.\_parent.target\_mc.hitTest(this.\_x, this.\_y)) {  
this.\_x = \_parent.target\_mc.\_x;  
this.\_y = \_parent.target\_mc.\_y;  
this.\_parent.target\_mc.\_alpha = 50;  
this.stopDrag();  
}  
}  
It works fine but I am trying to figure out onhow to make just the front of the bulet works on the center of the target.Als how can I stop it from jumping into place like it does?
