1084
Chapter 14: Properties
One significant difference between the
viewScale
and
scale
properties is that
viewScale
always scales from the center of the sprite’s bounding rectangle, whereas
scale
scales from a point
determined by the Flash movie’s
originMode
property.
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.
Example
This sprite script sets up a Flash movie sprite and doubles its view scale:
-- Lingo syntax
property spriteNum
on beginSprite me
sprite(spriteNum).viewScale = 200
end
// JavaScript syntax
function beginSprite() {
sprite(this.spriteNum).viewScale = 200;
}
See also
scaleMode
,
viewV
,
viewPoint
,
viewH
viewV
Usage
-- Lingo syntax
memberOrSpriteObjRef.
viewV
// JavaScript syntax
memberOrSpriteObjRef.
viewV;
Description
Cast member and sprite property; controls the vertical coordinate of a Flash movie and vector
shape’s view point, specified in pixel units. The values can be floating-point numbers. The default
value is 0.
A Flash movie’s view point is set relative to its origin point.
Setting a positive value for
viewV
shifts the movie up inside the sprite; setting a negative value
shifts the movie down. Therefore, changing the
viewV
property can have the effect of cropping
the movie or even of removing the movie from view entirely.
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.
Содержание 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...