User Guide

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).viewPoint + \
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).viewPoint +
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 sprites 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.