398
mouseLoc
Syntax
the mouseLoc
Description
Function; returns the current position of the mouse as a point().
The point location is given as two coordinates, with the horizontal location first, then the
vertical location.
See also
mouseH
,
mouseV
mouseMember
Syntax
the mouseMember
Description
System property; returns the cast member assigned to the sprite that is under the pointer when
the property is called. When the pointer is not over a sprite, it returns the result
VOID
.
The
mouseMember
property replaces
mouseCast
, used in earlier versions of Director.
You can use this function to make a movie perform specific actions when the pointer rolls over a
sprite and the sprite uses a certain cast member.
The value of the
mouseMember
property can change frequently. To use this property multiple
times in a handler with a consistent value, assign the
mouseMember
value to a local variable when
the handler starts and use the variable.
For casts other than cast 1,
mouseMember
returns a value that does not distinguish between the
cast member and the cast number. To distinguish the cast member and the cast number, use the
expression
member (the mouseMember)
; if the user doesn’t click a sprite, however, this expression
generates a script error.
Examples
The following statement checks whether the cast member Off Limits is the cast member assigned
to the sprite under the pointer and displays an alert if it is. This example shows how you can
specify an action based on the cast member assigned to the sprite.
if the mouseMember = member "Off Limits" then alert "Stay away from there!"
This statement assigns the cast member of the sprite under the pointer to the variable
lastMember
:
lastMember = the mouseMember
See also
member (sprite property)
,
memberNum
,
clickLoc
,
mouseChar
,
mouseItem
,
mouseLine
,
mouseWord
,
rollOver()
,
number (cast member property)
Содержание DIRECTOR MX-LINGO DICTIONARY
Страница 1: ...Lingo Dictionary Macromedia Director MX...
Страница 756: ...Index 756...