904
Chapter 14: Properties
Example
This sprite script uses the
originMode
property to set up a Flash movie sprite so it’s origin point
can be set to a specific point. It then sets the horizontal and vertical origin points.
-- Lingo syntax
property spriteNum
on beginSprite me
sprite(spriteNum).originMode = #point
sprite(spriteNum).originH = 100
sprite(spriteNum).originV = 80
end
// JavaScript syntax
function beginSprite() {
sprite(this.spriteNum).originMode = symbol("point");
sprite(this.spriteNum).originH = 100;
sprite(this.spriteNum).originV = 80;
}
See also
originV
,
originMode
,
originPoint
,
scaleMode
originMode
Usage
-- Lingo syntax
memberOrSpriteObjRef
.originMode
// JavaScript syntax
memberOrSpriteObjRef
.originMode;
Description
Cast member property and sprite property; sets the origin point around which scaling and
rotation occurs, as follows:
•
#center
(default)—The origin point is at the center of the Flash movie.
•
#topleft
—The origin point is at the top left of the Flash movie.
•
#point
—The origin point is at a point specified by the
originPoint
,
originH
, and
originV
properties.
This property can be tested and set.
Note:
This property must be set to the default value if the scaleMode property is set to #autoSize, or
the sprite will not display correctly.
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...