# Bitmpadata hitest crash

**URL:** <https://forum.kirupa.com/t/bitmpadata-hitest-crash/314743>\
**Category:** Uncategorized\
**Created:** [October 7, 2010, 12:14pm UTC](https://forum.kirupa.com/t/bitmpadata-hitest-crash/314743 "2010-10-07T12:14:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jagguy](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jagguy](https://forum.kirupa.com/u/jagguy)\
**Post date:** [October 7, 2010, 12:14pm UTC](https://forum.kirupa.com/t/bitmpadata-hitest-crash/314743/1 "2010-10-07T12:14:45Z")

</div>

when I use this hittest my program crashes?

The paramaters I have tested exist and it is simply 2 bitmaps.

enemyItem=myEnemy.getEnemy;  
myimg=enemyItem[0].img;  
bmpdata=myimg.bitmapData;

```
if( bmpdata.hitTest(new Point(myimg.x, myimg.y), 255, 
                                      myplayer.img.bitmapData,
                                       new Point(myplayer.xVal, myplayer.yVal),
                                       255))
```
