originPoint

Syntax: the originPoint of sprite whichFlashSprite
the originPoint of member whichFlashMember
Type: Cast member property; sprite property
Description: This property controls the origin point of a Flash movie. The origin point is the point around which scaling and rotation occurs.
The originPoint property is specified as a Director point value; for example, point(100,200). Setting a Flash movie'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.
The originPoint property can be tested and set. The default setting is 0.
Example: This sprite script uses the originMode property to set up a Flash movie sprite so it's origin point can be set to a specific point. It then sets the origin points.
on beginSprite me
	set the originMode of sprite the spriteNum of me = #point
	set the originPoint of sprite the spriteNum of me = point(100,80)
end

Related Lingo: originH property, originV property, originMode property

Previous | Next