> I have two sprites in a movie, one on top of the other. The top one
> partially covers the bottom one. Each sprite has a mouseEnter and a
> mouseLeave handler. Currently, when the mouse enters the larger bottom
> sprite, the mouseEnter handler for that sprite is called. When the mouse
> goes into the top sprite (to the portion where both sprites are one on top
> of the other) the mouseEnter handler for the top sprite is called and in
> addition the mouseLeave for the bottom sprite is also called.
> 
> I want to set things in such a way that the mouseLeave handler for the
> bottom sprite is called only when the mouse leaves it. I don't want
> Director to call it when the mouse is on top of both sprites.
> 
> I cannot change the code of the bottom sprite handlers.

If you copied the overlapping part of the top sprite into the bottom sprite
(assuming these sprites don't move around), then you could set the locZ of
the bottom sprite to higher than the top sprite's locZ on mouseEnter, and
then set it back to its original locZ on mouseLeave (Also assuming a matte
ink).

Otherwise, you'll have to find the intersecting rect, and do some fairly
involved checks on mouseLeave in the bottom sprite, and on exitframe in the
top sprite - check to see if the mouse is inside the overlapping part, and
decide what (if anything) to tell the other sprite.

-Kurt


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to