MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 1059

Director scripting reference
Table of Contents

Advertisement

translation
Usage
-- Lingo syntax
memberOrSpriteObjRef.translation
// JavaScript syntax
memberOrSpriteObjRef.translation;
Description
QuickTime cast member and sprite property; controls the offset of a QuickTime sprite's image
within the sprite's bounding box.
This offset is expressed in relation to the sprite's default location as set by its
property. When
rectangle; when
bounding rectangle.
The offset, specified in pixels as positive or negative integers, is set as a Director list: [
]. The
yTrans
xTrans
the
parameter specifies the vertical offset. The default setting is [0,0].
yTrans
When the sprite's
portions of the QuickTime movie by moving them outside the bounding rectangle. When the
property is set to
crop
positioned at the upper left corner of the sprite's rectangle.
This property can be tested and set.
Example
The following frame script assumes that the center property of the cast member of a 320-pixel-
wide QuickTime sprite in channel 5 is set to
the playhead in the current frame until the movie's horizontal translation point has moved to the
right edge of the sprite, in 10-pixel increments. This has a wipe right effect, moving the sprite out
of view to the right. When the sprite is out of view, the playhead continues to the next frame.
-- Lingo syntax
on exitFrame
horizontalPosition = sprite(5).translation[1]
if horizontalPosition < 320 then
sprite(5).translation = sprite(5).translation + [10, 0]
_movie.go(_movie.frame)
end if
end
// JavaScript syntax
function exitFrame() {
var horizontalPosition = sprite(5).translation[1];
if (horizontalPosition < 320 ) {
sprite(5).translation = sprite(5).translation + list(10, 0);
_movie.go(_movie.frame);
}
}
is set to
, the sprite is offset relative to the center of the bounding
center
TRUE
is set to
center
FALSE
parameter specifies the horizontal offset from the sprite's default location;
property is set to
crop
, the
FALSE
translation
, the sprite is offset relative to the upper left corner of the
, the
TRUE
translation
property is ignored, and the sprite is always
, and its crop property is set to
FALSE
center
xTrans,
property can be used to mask
TRUE
translation 1059
. It keeps

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Director mx 2004

Table of Contents