874
Chapter 14: Properties
mouseLevel
Usage
-- Lingo syntax
spriteObjRef
.mouseLevel
// JavaScript syntax
spriteObjRef
.mouseLevel;
Description
QuickTime sprite property; controls how Director passes mouse clicks on a QuickTime sprite
to QuickTime. The ability to pass mouse clicks within the sprite’s bounding rectangle can be
useful for interactive media such as QuickTime VR. The
mouseLevel
sprite property can have
these values:
•
#controller
—Passes clicks only on the movie controller to QuickTime. Director responds
only to mouse clicks that occur outside the controller. This is the standard behavior for
QuickTime sprites other than QuickTime VR.
•
#all
—Passes all mouse clicks within the sprite’s bounding rectangle to QuickTime. No clicks
pass to other Lingo handlers.
•
#none
—Does not pass any mouse clicks to QuickTime. Director responds to all mouse clicks.
•
#shared
—Passes all mouse clicks within a QuickTime VR sprite’s bounding rectangle to
QuickTime and then passes these events to Lingo handlers. This is the default value for
QuickTime VR.
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
.
-- Lingo syntax
on prepareFrame
if sprite(5).member.name contains "QTVR" then
sprite(5).mouseLevel = #all
else
sprite(5).mouseLevel = #none
end if
end
// JavaScript syntax
function prepareFrame() {
var nm = sprite(5).member.name;
var nmStr = nm.indexOf("QTVR");
if (nmStr != -1) {
sprite(5).mouseLevel = symbol("all");
} else {
sprite(5).mouseLevel = symbol("none");
}
}
Summary of Contents for DIRECTOR MX 2004
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...