EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 431

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING
1130 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
nudge() 431
nudge()
Usage
-- Lingo syntax
spriteObjRef.nudge(#direction)
// JavaScript syntax
spriteObjRef.nudge(#direction);
Description
QuickTime VR command; nudges the view perspective of the specified QuickTime VR sprite in
a specified direction.
Nudging to the right causes the image of the sprite to move to the left. The
nudge command has
no return value.
Parameters
direction
Required. Specifies the direction to nudge the view perspective. Valid values include
the following:
• #down
• #downLeft
• #downRight
• #left
• #right
• #up
• #upLeft
• #upRight
Example
This handler causes the perspective of the QTVR sprite to move to the left as long as the mouse
button is held down on the sprite:
-- Lingo syntax
on mouseDown me
repeat while the stillDown
sprite(1).nudge(#left)
end repeat
end
// JavaScript syntax
function mouseDown() {
do {
sprite(1).nudge(#left);
} while _mouse.stillDown;
}