Build on this simple behavior and you're ready to rock'n'roll:
on mouseEnter (me)
-- boost this sprite's locZ
sprite(me.spriteNum).locZ = 100000
-- message all sprites to reset their locZ
sendAllSprites(#resetLocZ,me.spriteNum)
end mouseEnter
on resetLocZ (me, thisSpriteNum)
-- if this sprite was not the message sender, then respond...
if (me.spriteNum <> thisSpriteNum) then
-- ...by resetting the sprite's locZ value
sprite(me.spriteNum).locZ = me.spriteNum
end if
end resetLocZ
Cheers,
Tom
> -----Original Message-----
> From: victor zambrano [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 22, 2001 10:03 PM
> To: [EMAIL PROTECTED]
> Subject: RE: <lingo-l> bring to front a sprite on rollover
>
>
> thanks to tom and buzz. i tried it and it works.
>
> now i'll figure out a way of keeping the sprite frontmost
> until rollovering
> another one. it'll need some lingo, but if somebody has a
> shortcut, or an
> idea, i would be glad to hear it. i imagine that with a movie
> script that
> checks the mouseenter and orders the sprites' locz would be ok.
>
> hope it doesn't takes loads of time.
>
> victor
> --
> victor zambrano
> [EMAIL PROTECTED]
> --
>
>
> > Date: Wed, 22 Aug 2001 11:42:07 -0700
> > From: Thomas Higgins <[EMAIL PROTECTED]>
> > Subject: RE: <lingo-l> bring to front a sprite on rollover
> >
> > Victor,
> > Try setting the sprite's locZ property. Layering on stage
> doesn't really occur
> > based on sprite channel numbers, rather the layering order
> is determined by
> > each sprite's locZ value (the locZ value of a sprite
> defaults to the sprite's
> > channel number so by default, it appears as if sprite
> channel numbers are the
> > determining factor). The locZ property of a sprite can have
> a value from -2
> > billion to +2 billion (not zero though), and therefore on
> rollover you can
> > simply set its value to something really high (100000?) and
> then when the
> > mouse leaves, reset the locZ to the sprite's channel number.
> >
> > Have fun,
> > Tom
> >---------------------------
> > Date: Wed, 22 Aug 2001 16:42:54 -0400
> > From: Buzz Kettles <[EMAIL PROTECTED]>
> > Subject: RE: <lingo-l> bring to front a sprite on rollover
> >
> > I'd like to add this to Tom's note:
> >
> > Stage layering DOES occur based on sprite channels.
> >
> > Just placing a sprite into a channel auto-magically sets the locZ
> > equal to the channel number unless you use Lingo to specify a
> > different locZ.
> >
> > Using the Lingo property provides an override on the 'natural'
> > layering effect that happens because of score channel layout.
> >
> > hth
> >
> > - -Buzz
>
>
> [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!]
>
[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!]