Lingo generates messages that can be sent in response to some internal or external activity or script.There are six different Lingo messages that relate to the mouse:
mouseDownThe mouse messages are sent in response to mouse activity.
mouseUp
mouseUpOutside
mouseEnter
mouseWithin
mouseLeavemouseDown - This message means that the mouse button has been pressed down while the mouse pointer is within the sprite.
mouseUp - This message means the mouse button has been released, and the mouse pointer is within the sprite.
mouseUpOutside - This message means the mouse button has been released, and the mouse pointer has moved outside the boundaries of the sprite.
mouseEnter - This message means that the mouse pointer has entered the sprite.
mouseWithin - This message means that the mouse pointer is still in the sprite.
mouseLeave - This message means the mouse pointer has moved outside the boundaries of the sprite.
Here are sample scripts that demonstrate mouseDown, mouseUp and mouseStillDown. Create a cast member named "Demo 1"and try typing in the script. Click on the buttonand see what happens. Then change the script to use mouseEnter, mouseLeave and mouseWithin. Notice the change in the way the button responds.
on mouseDownHere is a script that will demonstrate mouseEnter and mouseLeave. Create a new sprite named "Demo 2." Type this script into the cast member script and click the sprite:puppetSound "doorbell.aiff"end mouseDownon mouseStillDown
add 10 to messageend mouseStillDown
on mouseEnterbeep 3end mouseEnteron mouseLeave
beep 2end mouseLeave