Lingo Dictionary > T-Z > viewScale

 

viewScale

Syntax

sprite(whichVectorOrFlashSprite).viewScale
the viewScale of sprite whichVectorOrFlashSprite
member(whichVectorOrFlashMember).viewScale
the viewScale of member whichVectorOrFlashMember

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.

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:

on beginSprite me
	sprite(spriteNum of me).viewScale = 200
end

See also

scaleMode, viewV, viewPoint, viewH