how to avoid transparent part of bitmap to react with mouse events?
Hi, there.
What I have is a bitmap as render cache for a sprite, and there're many of them present on the stage. I expected that they would react like sprites with mouse-click event, but they didn't. They're like rectangles all around, matter what the original sprite look like, And I tried put bitmap cache into sprite container and use sprite's hitArea property like:
var container:Sprite = new Sprite();
container.addChild(bitmapCache);
container.hitArea = someSpriteMadeUp;
OK, container sprite now only react with mouse according to "someSpriteMadeUp", but the rectangle of bitmapCache is like a mask, covering every thing behind it, even the transparent part and out of the boundary of container.hitArea.
Then I tried:
var container:Sprite = new Sprite();
var bitmapCantainer:Sprite = new Sprite();
bitmapCantainer.addChild(bitmapCache);
bitmapCantainer.mouseEnabled = false;
bitmapCantainer.mouseChildren = false;
container.addChild(bitmapCantainer);
container.hitArea = someSpriteMadeUp;
Nothing changed, just like the first way.
So my question is, is there any way I can prevent bitmap's transparent part covering display objects behind? just like normal sprites do.
Thank you for any suggestion!
All best
Andrew.
