712
Changing the view point of a cast member changes only the view of a movie in the sprite’s
bounding rectangle, not the location of the sprite on the Stage. The view point is the coordinate
within a cast member that is displayed at the center of the sprite’s bounding rectangle and is always
expressed relative to the movie’s origin (as set by the
originPoint
,
originH
, and
originV
properties). For example, if you set a Flash movie’s view point at point (100,100), the center of the
sprite is the point within the Flash movie that is 100 Flash movie pixel units to the right and 100
Flash movie pixel units down from the origin point, regardless of where you move the origin point.
The
viewPoint
property is specified as a Director point value: for example, point (100,200).
Setting a Flash movie’s view point with the
viewPoint
property is the same as setting the
viewH
and
viewV
properties separately. For example, setting the
viewPoint
property to point (50,75) is
the same as setting the
viewH
property to 50 and the
viewV
property to 75.
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:
on panAcross whichSprite
repeat with i = 1 to 10
sprite(whichSprite).viewPoint = sprite(whichSprite).vie point(i *
-5, i * -5)
updateStage
end repeat
end
See also
scaleMode
,
viewV
,
viewH
,
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.
Содержание DIRECTOR MX-LINGO DICTIONARY
Страница 1: ...Lingo Dictionary Macromedia Director MX...
Страница 756: ...Index 756...