# Adv BitmapData CollisionDetection?

**URL:** <https://forum.kirupa.com/t/adv-bitmapdata-collisiondetection/255652>\
**Category:** flash\
**Created:** [March 25, 2008, 6:38pm UTC](https://forum.kirupa.com/t/adv-bitmapdata-collisiondetection/255652 "2008-03-25T18:38:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Enix591](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/enix591/32/751_2.png) [@Enix591](https://forum.kirupa.com/u/Enix591)\
**Post date:** [March 25, 2008, 6:38pm UTC](https://forum.kirupa.com/t/adv-bitmapdata-collisiondetection/255652/1 "2008-03-25T18:38:23Z")

</div>

I want to do collision detection between two display objects, a Bitmap and a mc.

However i only want to test collision between the non transparent pixels.

How would i do this?

See, ive got a sprite sheet, and i animate the character perfectly like so:

(The “NinjaSpriteSheets” is an mc in my timeline with only a png in it)

```auto

// Get the sprite sheet movie clip. //
var spriteSheet:NinjaSpriteSheets=new NinjaSpriteSheets();
 
 // Go to the selected characters frame. //
spriteSheet.gotoAndStop ( Character);
 
// Setup the bitmap data.//
var currentSprite:BitmapData = new BitmapData(spriteSheet.width, spriteSheet.height, true, 0x00000000);
 
// The coordinates of the rectangle
var yCoordinate=GetActionIndex()*80;
var xCoordinate=CurrentFrame*80;
 
 // the clipping rectangle.//
var rect:Rectangle = new Rectangle(xCoordinate,yCoordinate,80,80);
 
// draw the sprite to our bitmap. //
currentSprite.draw (spriteSheet,null,null,null,rect);
 
// Position the bitmap so the sprite is properly aligned.//
_Bitmap.x=-(xCoordinate+40);
_Bitmap.y=-(yCoordinate+80);
 
// Set the bitmap data to the current sprite.//
_Bitmap.bitmapData=currentSprite;
 

```

The “\_Bitmap” Bitmap is already a child in my mc. I want to check if its solid pixels hits those of another mc.

How would i do so?
