# Advanced Collision detection in sprite classes

**URL:** <https://forum.kirupa.com/t/advanced-collision-detection-in-sprite-classes/58715>\
**Category:** programming\
**Created:** [July 25, 2004, 3:18pm UTC](https://forum.kirupa.com/t/advanced-collision-detection-in-sprite-classes/58715 "2004-07-25T15:18:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rathamon](https://avatars.discourse-cdn.com/v4/letter/r/9fc348/32.png) [@Rathamon](https://forum.kirupa.com/u/Rathamon)\
**Post date:** [July 25, 2004, 3:18pm UTC](https://forum.kirupa.com/t/advanced-collision-detection-in-sprite-classes/58715/1 "2004-07-25T15:18:38Z")

</div>

Hi,  
I just wrote my first simple game in flash (learning for about a week) and it works, so I put it on the frontpage of my website…  
[http://fruit.homedns.org](http://fruit.homedns.org)

Only problem I’ve had is that the collision detection uses hitTest which uses bounding boxes so crashing into asteroids can happen even if you arent even close.

I designed the game using a sprite class I wrote  
[http://fruit.homedns.org/Sprite.as](http://fruit.homedns.org/Sprite.as)

I just read the article about advanced collision detection @  
[http://www.kirupa.com/developer/actionscript/advanced\_collision.htm](http://www.kirupa.com/developer/actionscript/advanced_collision.htm)

However since I’m using an Array of sprite classes to display my Sprites in the game , its going to be tricky to create a layer for each shape and a set of perimeter Symbols…

Any idea how to incoporate this kind of functionality more conviniently?

thanks
