You can manually send MouseEvents to mouse disabled children. Interesting! comments?

I don’t know why but I thought that this was pretty interesting, that even if an objects’ parent has mouseChildren=false; you can still have it dispatch and receive mouse events.

var a:Sprite = new Sprite;
a.graphics.beginFill(0xFF0000);
a.graphics.drawRect(0,0,50,50);
a.buttonMode=true;
a.mouseChildren = false;
a.name = 'red';
a.addEventListener(MouseEvent.CLICK, MC, false, 0, true);
addChild(a);

var b:Sprite = new Sprite;
b.graphics.beginFill(0x00FF00);
b.graphics.drawRect(0,0,25,25);
b.name = 'green';
b.addEventListener(MouseEvent.CLICK, MC2, false, 0, true);
b.x=55
a.addChild(b);

function MC(e:MouseEvent):void
/**/
{
	e.stopImmediatePropagation();
	trace(e.target.name + ' was clicked 1');
	b.dispatchEvent(new MouseEvent('click', false, true));
}

function MC2(e:MouseEvent):void
/**/
{
	trace(e.target.name + ' was clicked 2');
}