Lingo Dictionary > T-Z > translation |
![]() ![]() ![]() |
translation
Syntax
member(
whichQuickTimeMember
).translation
the translation of member
whichQuickTimeMember
sprite(
whichQuickTimeSprite
).translation
the translation of sprite
whichQuickTimeSprite
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 center
property. When center
is set to TRUE
, the sprite is offset relative to the center of the bounding rectangle; when center
is set to FALSE
, the sprite is offset relative to the upper left corner of the bounding rectangle.
The offset, specified in pixels as positive or negative integers, is set as a Director list: [xTrans
,
yTrans
]. The xTrans
parameter specifies the horizontal offset from the sprite's default location; the yTrans
parameter specifies the vertical offset. The default setting is [0,0].
When the sprite's crop
property is set to TRUE
, the translation
property can be used to mask portions of the QuickTime movie by moving them outside the bounding rectangle. When the crop
property is set to FALSE
, the translation
property is ignored, and the sprite is always positioned at the upper left corner of the sprite's rectangle.
This property can be tested and set.
Example
This frame script assumes that the center property of the cast member of a 320-pixel-wide QuickTime sprite in channel 5 is set to FALSE
, and its crop property is set to TRUE
. It keeps the playback head 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 playback head continues to the next frame.
on exitFrame horizontalPosition = sprite(5).translation[1] if horizontalPosition < 320 then sprite(5).translation = sprite(5).translation + [10, 0] go the frame end if end
![]() ![]() ![]() |