This content has been marked as final. Show 2 replies
This is kind of messy, but you can put something like this on the sprite
(Warning- untested, off-the-top-of-my-head script):
on mouseUp me
and on the other sprites that need to receive the click,
on check4Click me, vMouseLoc
if vMouseLoc.inside(sprite(me.spriteNum).rect) then
Just make sure you don't get into a circular situation where the sprite
gets both handlers in a loop...
If you *have* to:
on mouseUp me, obj
if obj=me then exit
-- add code here.
put me, obj
-- if the script is a behavior, the obj.voidP check is required.
if obj.voidP then sendAllSprites(#mouseUp, me)
"Darrel Hoffman" <email@example.com> wrote in message
> Is there a way to make events such as mouseEnter, mouseLeave, mouseWithin,
> etc. work on multiple sprites at the same time? Thus if you're rolling
> 2 sprites at once, a command is passed to both of them, instead of just
> one on top? I was pretty sure that the "pass" command was supposed to do
> this, but it doesn't seem to do anything at all for these handlers. (It
> really should - would make it a much more useful command.) I know I could
> run a rollover script from a frame handler to get the same effect, but
> would require individually checking each sprite with the behavior, rather
> than the behaviors handling themselves as they ideally should.
> (Particularly if the number of sprites using the behavior is not a
> constant.) Thus, I want something that works on the behavior script
> rather than being operated by a third party like the frame script or an
> independant movie script. Any suggestions?