weimingtom / nekonme

Automatically exported from code.google.com/p/nekonme
0 stars 0 forks source link

Bitmap is not transparent for mouse #204

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

var sprite = new Sprite();
sprite.graphics.beginFill(0xff0000);
sprite.graphics.drawRect(10, 10, 80, 80);
sprite.graphics.endFill();
addChild(sprite);

var bitmap = new Bitmap(new BitmapData(100, 100, false, 0xff808080));
bitmap.alpha = .5;
addChild(bitmap);

sprite.addEventListener(MouseEvent.CLICK, onClick);

function onClick(event:MouseEvent):Void
{
    trace("CLICKED");
}

Expected: "CLICKED" tracing on mouse click on rectangle center
Getted: none - bitmap is locks click for sprite
(in flash bitmaps is not dispatch mouse events and is transparent for mouse)

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
nme 3.2.0, target: windows, OS: Windows XP

Original issue reported on code.google.com by cse...@gmail.com on 12 Mar 2012 at 5:04

GoogleCodeExporter commented 8 years ago
You're wrong: transparent bitmaps in Flash capture mouse events. NME behavior 
is consistent.

http://stackoverflow.com/questions/5416629/forward-mouseevent-in-transparent-bit
map-to-underlying-movieclip

Original comment by philippe...@gmail.com on 28 May 2012 at 7:30