viewScale 1083
Director point values specified for the
viewPoint
property are restricted to integers, whereas
viewH
and
viewV
can be specified with floating-point numbers. When you test the
viewPoint
property, the point values are truncated to integers. As a general guideline, use the
viewH
and
viewV
properties for precision; use the
originPoint
property for speed and convenience.
This property can be tested and set. The default value is point (0,0).
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 handler makes a specified Flash movie sprite move down and to the right in increments of
five Flash movie pixel units:
-- Lingo syntax
on panAcross(whichSprite)
repeat with i = 1 to 10
sprite(whichSprite).viewPoint = sprite(whichSprite).vie \
point(i * -5, i * -5)
_movie.updateStage()
end repeat
end
// JavaScript syntax
function panAcross(whichSprite) {
var i = 1;
while(i < 11) {
sprite(whichSprite).viewPoint = sprite(whichSprite).vie
point(i * -5, i * -5);
_movie.updateStage();
i++
}
}
See also
scaleMode
,
viewV
,
viewH
,
viewScale
viewScale
Usage
-- Lingo syntax
memberOrSpriteObjRef
.viewScale
// JavaScript syntax
memberOrSpriteObjRef
.viewScale;
Description
Cast member property and sprite property; sets the overall amount to scale the view of a Flash
movie or vector shape sprite within the sprite’s bounding rectangle. You specify the amount as a
percentage using a floating-point number. The default value is 100.
The sprite rectangle itself is not scaled; only the view of the cast member within the rectangle is
scaled. Setting the
viewScale
property of a sprite is like choosing a lens for a camera. As the
viewScale
value decreases, the apparent size of the movie within the sprite increases, and vice
versa. For example, setting
viewScale
to 200% means the view inside the sprite will show twice
the area it once did, and the cast member inside the sprite will appear at half its original size.
Содержание 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...