Description
Mouse property; contains the number of the word under the pointer when the property is called
and when the pointer is over a field sprite. Read-only.
Counting starts from the beginning of the field. When the mouse is not over a field, the result
is -1.
The value of the
this property multiple times, it's usually a good idea to call the function once and assign its value
to a local variable.
Example
This statement determines whether the pointer is over a field sprite and changes the content of
the field cast member Instructions to "Please point to a word." when it is not:
-- Lingo syntax
if (_mouse.mouseWord = -1) then
member("Instructions").text = "Please point to a word."
else
member("Instructions").text = "Thank you."
end if
// JavaScript syntax
if (_mouse.mouseWord == -1) {
member("Instructions").text = "Please point to a word.";
}
else {
member("Instructions").text = "Thank you.";
}
This statement assigns the number of the word under the pointer in the specified field to the
variable
currentWord
-- Lingo syntax
currentWord = member(_mouse.mouseMember).word[_mouse.mouseWord]
// JavaScript syntax
var currentWord = member(_mouse.mouseMember).getProp("word",
_mouse.mouseWord);
See also
Mouse, mouseChar,
moveableSprite
Usage
sprite(whichSprite).moveableSprite
the moveableSprite of sprite whichSprite
Description
Sprite property; indicates whether a sprite can be moved by the user (
You can make a sprite moveable by using the Moveable option in the Score. However, to control
whether a sprite is moveable and to turn this condition on and off as needed, use Lingo. For
example, to let users drag sprites one at a time and then make the sprites unmoveable after they
are positioned, turn the
property can change in a handler or loop. If a handler or loop uses
mouseWord
:
mouseItem
moveableSprite
sprite property on and off at the appropriate times.
) or not (
).
TRUE
FALSE
moveableSprite
881
Need help?
Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?
Questions and answers