User Guide

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.