Lingo Dictionary > O-R > originPoint |
![]() ![]() ![]() |
originPoint
Syntax
sprite
whichVectorOrFlashSprite.
originPoint
the originPoint of sprite
whichVectorOrFlashSprite
member(
whichVectorOrFlashMember
)
.
originPoint
the originPoint of member
whichVectorOrFlashMember
Description
Cast member and sprite property; controls the origin point around which scaling and rotation occurs of a Flash movie or vector shape.
The originPoint
property is specified as a Director point value: for example, point(100,200). Setting a Flash movie or vector shape's origin point with the originPoint
property is the same as setting the originH
and originV
properties separately. For example, setting the originPoint
property to point(50,75) is the same as setting the originH
property to 50 and the originV
property to 75.
Director point values specified for the originPoint
property are restricted to integers, whereas originH
and originV
can be specified with floating-point numbers. When you test the originPoint
property, the point values are truncated to integers. As a rule of thumb, use the originH
and originV
properties for precision; use the originPoint
property for speed and convenience.
You can set the originPoint
property only if the originMode
property is set to #point
.
This property can be tested and set. The default value is 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 sprite script uses the originMode
property to set up a Flash movie sprite so its origin point can be set to a specific point. It then sets the origin points.
on beginSprite me sprite(me.spriteNum).scaleMode = #showAll sprite(me.spriteNum).originMode = #point sprite(me.spriteNum).originPoint = point(100, 80) end
See also
![]() ![]() ![]() |