906
Chapter 14: Properties
Example
This sprite script uses the
originMode
property to set up a Flash movie sprite so its origin point
can be set to a specific point. It then sets the origin points.
-- Lingo syntax
property spriteNum
on beginSprite me
sprite(spriteNum).scaleMode = #showAll
sprite(spriteNum).originMode = #point
sprite(spriteNum).originPoint = point(100, 80)
end
// JavaScript syntax
function beginSprite() {
sprite(this.spriteNum).scaleMode = symbol("showAll");
sprite(this.spriteNum).originMode = symbol("point");
sprite(this.spriteNum).originPoint = point(100, 80);
}
See also
originH
,
originV
,
scaleMode
originV
Usage
-- Lingo syntax
memberOrSpriteObjRef
.originv
// JavaScript syntax
memberOrSpriteObjRef
.originV;
Description
Cast member and sprite property; controls the vertical coordinate of a Flash movie or vector
shape’s origin point around which scaling and rotation occurs, in pixels. The value can be a
floating-point value.
The origin point can be set with floating-point precision using the separate
originH
and
originV
properties, or it can be set with integer precision using the single
originPoint
property.
You can set the
originV
property only if the
originMode
property is set to
#point
.
This property can be tested and set. The default value is 0.
Note:
This property must be set to the default value if the scaleMode property is set to #autoSize, or
the sprite does not display correctly.
Содержание DIRECTOR MX 2004-DIRECTOR SCRIPTING
Страница 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Страница 48: ...48 Chapter 2 Director Scripting Essentials...
Страница 100: ...100 Chapter 4 Debugging Scripts in Director...
Страница 118: ...118 Chapter 5 Director Core Objects...
Страница 594: ...594 Chapter 12 Methods...
Страница 684: ...684 Chapter 14 Properties See also DVD...
Страница 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Страница 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Страница 889: ...netPresent 889 _player alert Sorry the Network Support Xtras could not be found See also Player...
Страница 1102: ...1102 Chapter 14 Properties...