views:

933

answers:

2

In a pure Actionscript 3 project, I have a sprite that overlaps another sprite. The lower sprite normally handles mouse clicks. The lower sprite no longer processes mouse events when it is overlapped by the higher sprite.

I understand that this is normal behavior.

I would like the lower sprite to handle mouse events when it is overlapped. (In my particular instance, the higher sprite is just a decorative piece; it has no normal mouse interactivity anyway.) Is this possible? Is there a way to route mouse events through the higher sprite?

I found a short, dated discussion about my problem here:

http://kb2.adobe.com/cps/137/tn_13766.html

Thank you.

+6  A: 

Should be something like this:

higherSprite.mouseEnabled=false;
higherSprite.mouseChildren=false;
Cay
You only need to set mouseEnabled.
Lillemanden
If you have other InteractiveObjects (MovieClip, Sprite, etc...) within "higherSprite" you need mouseChildren=false too ;)
Cay
A: 

This worked well for me! Thank you, Cay and Lillemanden.

Johann