mouseItem
Usage
-- Lingo syntax
_mouse.mouseItem
// JavaScript syntax
_mouse.mouseItem;
Description
Mouse property; contains the number of the item under the pointer when the property is called
and the pointer is over a field sprite. Read-only.
An item is any sequence of characters delimited by the current delimiter as set by
itemDelimiter
not over a field, the result is -1.
The value of the
on the initial value of
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 an item." when it is not:
-- Lingo syntax
if (mouse.mouseItem = -1) then
member("Instructions").text = "Please point to an item."
end if
// JavaScript syntax
if (_mouse.mouseItem == -1) {
member("Instructions").text = "Please point to an item.";
}
This statement assigns the item under the pointer in the specified field to the variable
:
currentItem
-- Lingo syntax
currentItem = member(_mouse.mouseMember).item[_mouse.mouseItem]
// JavaScript syntax
var currentItem = member(_mouse.mouseMember).getProp("item",
_mouse.mouseItem);
See also
itemDelimiter, Mouse, mouseChar, mouseLine,
property. Counting starts at the beginning of the field. If the mouse pointer is
property can change in a handler or loop. If a handler or loop relies
mouseItem
when the handler or loop begins, call this property once and
mouseItem
mouseWord
the
mouseItem
873
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