399
mouseOverButton
Syntax
sprite
whichFlashSprite.
mouseOverButton
the mouseOverButton of sprite
whichFlashSprite
Description
Flash sprite property; indicates whether the mouse pointer is over a button in a Flash movie sprite
specified by the
whichFlashSprite
parameter (
TRUE
), or whether the mouse pointer is outside
the bounds of the sprite or the mouse pointer is within the bounds of the sprite but over a
nonbutton object, such as the background (
FALSE
).
This property can be tested but not set.
Example
This frame script checks to see if the mouse pointer is over a navigation button in the Flash movie
in sprite 3. If the mouse pointer is over the button, the script updates a text field with an
appropriate message; otherwise, the script clears the message.
on enterFrame
case sprite(3).mouseOverButton of
TRUE:
member("Message Line").text = "Click here to go to the next page."
FALSE:
member("Message Line").text = " "
end case
updatestage
end
on mouseUp (event handler)
Syntax
on mouseUp
statement(s)
end
Description
System message and event handler; contains statements that are activated when the mouse button
is released.
When the mouse button is released, Lingo searches the following locations, in order, for an
on
mouseUp
handler: primary event handler, sprite script, cast member script, frame script, and
movie script. Lingo stops searching when it reaches the first location that has an
on mouseUp
handler, unless the handler includes the
pass
command to explicitly pass the
mouseUp
message on
to the next location.
To create the same response throughout the movie when the user releases the mouse button, set
the mouseUpScript
.
An
on mouseUp
event handler is a good place to put Lingo that changes the appearance of
objects—such as buttons—after they are clicked. You can do this by switching the cast member
assigned to the sprite after the sprite is clicked and the mouse button is released.
Содержание DIRECTOR MX-LINGO DICTIONARY
Страница 1: ...Lingo Dictionary Macromedia Director MX...
Страница 756: ...Index 756...