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

**URL:** <https://forum.kirupa.com/t/you-can-manually-send-mouseevents-to-mouse-disabled-children-interesting-comments/303984>\
**Category:** flash\
**Created:** [January 30, 2010, 4:13am UTC](https://forum.kirupa.com/t/you-can-manually-send-mouseevents-to-mouse-disabled-children-interesting-comments/303984 "2010-01-30T04:13:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaedo](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@Shaedo](https://forum.kirupa.com/u/Shaedo)\
**Post date:** [January 30, 2010, 4:13am UTC](https://forum.kirupa.com/t/you-can-manually-send-mouseevents-to-mouse-disabled-children-interesting-comments/303984/1 "2010-01-30T04:13:39Z")

</div>

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.

```auto
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');
}

```
