# Hittest problem

**URL:** https://forum.kirupa.com/t/hittest-problem/255974
**Category:** Uncategorized
**Created:** [March 28, 2008, 6:14pm UTC](https://forum.kirupa.com/t/hittest-problem/255974 "2008-03-28T18:14:55Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![phrzn\_phlme](https://avatars.discourse-cdn.com/v4/letter/p/c0e974/32.png) [@phrzn\_phlme](https://forum.kirupa.com/u/phrzn_phlme)
#### Post date: [March 28, 2008, 6:14pm UTC](https://forum.kirupa.com/t/hittest-problem/255974/1 "2008-03-28T18:14:55Z")

</div>

[SIZE=4][FONT=Comic Sans MS]Hello. I just found out about [Kirupa.com](http://Kirupa.com) and I wanted to ask a question.

Let’s say I have a ball (instance name is **“ball”** ) and if I hit the enemy ball (instance name is **“enemy”** ) it’ll dissappear, and add 100 points. At the same time, I want them to multiply and get faster.

The enemy has a follower code:

\*\*onClipEvent (enterFrame) {  
if (\_root.ball.\_x\>\_x) {  
\_x += 2;  
}  
}  
onClipEvent (enterFrame) {  
if (\_root.ball.\_x\<\_x) {  
\_x -= 2;  
}  
}  
onClipEvent (enterFrame) {  
if (\_root.ball.\_y\>\_y) {  
\_y += 2;  
}  
}  
onClipEvent (enterFrame) {  
if (\_root.ball.\_y\<\_y) {  
\_y -= 2;  
}  
}

\*\*The mouse has a custom cursor:

\*\*onClipEvent(load) { //when the movie clip loads  
Mouse.hide(); // hide the normal mouse  
startDrag(this,true); // and drag the cursor MC to follow the mouse  
}

\*\*And the ball has a code that is secret because if I give it to you it’ll spoil the game idea.

The dynamic text box has an instance of **“points”**.

I have my mute sound control done and the ball you control done.

-PHROZEN PHLAME:wasted::wasted::wasted::wasted::wasted::wasted:  
[/FONT][/SIZE]
