open() (Player)
435
offset() (rectangle function)
Usage
rectangle.offset(
horizontalChange
,
verticalChange
)
offset (
rectangle
,
horizontalChange
,
verticalChange
)
Description
Function; yields a rectangle that is offset from the rectangle specified by
rectangle
.
Parameters
horizontalChange
Required. Specifies the horizontal offset, in pixels. When
horizontalChange
is greater than 0, the offset is toward the right of the Stage; when
horizontalChange
is less than 0, the offset is toward the left of the Stage.
verticalChange
Required. Specifies the vertical offset, in pixels. When
verticalChange
is
greater than 0, the offset is toward the top of the Stage; when
verticalChange
is less than 0, the
offset is toward the bottom of the Stage.
Example
This handler moves sprite 1 five pixels to the right and five pixels down:
-- Lingo syntax
on diagonalMove
newRect=sprite(1).rect.offset(5, 5)
sprite(1).rect=newRect
end
// JavaScript syntax
function diagonalMove() {
newRect = sprite(1).rect.offset(5,5);
sprite(1).rect = newRect;
}
open() (Player)
Usage
-- Lingo syntax
_player.open({
stringDocPath
,}
stringAppPath
)
// JavaScript syntax
_player.open({
stringDocPath
,}
stringAppPath
);
Description
Player method; opens a specified application, and optionally opens a specified file when the
applicatin opens.
When either
stringDocPath
or
stringAppPath
are in a different folder than the current movie,
you must specify the full pathname to the file or files.
The computer must have enough memory to run both Director and other applications at the
same time.
This is a very simple method for opening an application or a document within an application. For
more control, look at options available in third-party Xtra extensions.
Summary of Contents for DIRECTOR MX 2004-DIRECTOR SCRIPTING
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...