# Help: Keeping Score: Ball \> Hoop

**URL:** https://forum.kirupa.com/t/help-keeping-score-ball-hoop/5785
**Category:** Uncategorized
**Created:** [September 21, 2002, 10:15pm UTC](https://forum.kirupa.com/t/help-keeping-score-ball-hoop/5785 "2002-09-21T22:15:28Z")
**Posts on this page:** 4
**Page:** 2

<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 22, 2002, 2:49am UTC](https://forum.kirupa.com/t/help-keeping-score-ball-hoop/5785/21 "2002-09-22T02:49:09Z")

</div>

Although I’m a natural insomniac - I am actually tired. I’ve got a couple of things to finish off for a client, then I’m gonna hit the sack.

---

<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 22, 2002, 2:51am UTC](https://forum.kirupa.com/t/help-keeping-score-ball-hoop/5785/22 "2002-09-22T02:51:40Z")

</div>

Change the last hit test to this, else the ball just keeps bouncing on y. I’m sure there are better ways - I’ll check when I’m less tired

if ((this.hitTest(\_root.rimtop.\_x, \_root.rimtop.\_y, true))) {  
this.\_y = this.\_y-10;  
this.\_x = this.\_x-10;  
speedy \*= -bounce;  
}

---

<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 22, 2002, 2:54am UTC](https://forum.kirupa.com/t/help-keeping-score-ball-hoop/5785/23 "2002-09-22T02:54:34Z")

</div>

Might use getBounds() to check the heights of the rims - if you want it more accurate - then you can apply the same effect the ball has when it hits the ground and walls.

---

<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 22, 2002, 3:00am UTC](https://forum.kirupa.com/t/help-keeping-score-ball-hoop/5785/24 "2002-09-22T03:00:05Z")

</div>

I’m off to get some sleep. Maybe someone can work on it till I get a chance to have another look at it.

[Previous page](https://forum.kirupa.com/t/help-keeping-score-ball-hoop/5785.md?page=1)
