We should just test the bitmap itself, not the source frames.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@987 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -80,14 +80,13 @@ public class MultiFrameBitmap extends Sprite
|
|||||||
if (_curFrameIndex == -1) {
|
if (_curFrameIndex == -1) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
var frame :Bitmap = getFrame(_curFrameIndex);
|
if (_bitmap.hitTestPoint(stageX, stageY, true)) {
|
||||||
if (frame.hitTestPoint(stageX, stageY, true)) {
|
|
||||||
// Doesn't even hit the bounds...
|
// Doesn't even hit the bounds...
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Check the actual pixels...
|
// Check the actual pixels...
|
||||||
var pt :Point = frame.globalToLocal(new Point(stageX, stageY));
|
var pt :Point = _bitmap.globalToLocal(new Point(stageX, stageY));
|
||||||
return frame.bitmapData.hitTest(new Point(0, 0), 0, pt);
|
return _bitmap.bitmapData.hitTest(new Point(0, 0), 0, pt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user