397
This property can be tested and set.
Example
This frame script checks to see if the name of the QuickTime sprite in channel 5 contains the string
“QTVR.” If it does, this script sets
mouseLevel
to
#all
; otherwise, it sets
mouseLevel
to
#none
.
on prepareFrame
if sprite(5).member.name contains "QTVR" then
sprite(5).mouseLevel = #all
else
sprite(5).mouseLevel = #none
end if
end
mouseLine
Syntax
the mouseLine
Description
System property; contains the number of the line under the pointer when the property is called
and the pointer is over a field sprite. Counting starts at the beginning of the field; a line is defined
by Return delimiter, not by the wrapping at the edge of the field. When the mouse pointer is not
over a field sprite, the result is -1.
The value of the
mouseLine
property can change in a handler or repeat loop. If a handler or
repeat loop uses this property multiple times, it’s usually a good idea to call the property once and
assign its value to a local variable.
Examples
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 line.” when it is not:
if the mouseLine = -1 then
member("Instructions").text = "Please point to a line."
This statement assigns the contents of the line under the pointer in the specified field to the
variable
currentLine
:
currentLine = member(the mouseMember).line[the mouseLine]
This handler highlights the line under the pointer when the mouse button is pressed:
on mouseDown
thisField = sprite(the clickOn).member
if the mouseLine < 1 then exit
lastLine = 0
repeat while the stillDown
ML = the mouseLine
if ML < 1 then next repeat
if ML <> lastLine then
thisField.line[ML].hilite()
lastLine = ML
end if
end repeat
end
See also
mouseChar
,
mouseItem
,
mouseWord
,
line...of
,
number (lines)
Содержание DIRECTOR MX-LINGO DICTIONARY
Страница 1: ...Lingo Dictionary Macromedia Director MX...
Страница 756: ...Index 756...