Lingo Dictionary > O-R > originH

 

originH

Syntax

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

Description

Cast member and sprite property; controls the horizontal coordinate of a Flash movie or vector shape's origin point, in pixels. The value can be a floating-point value.

The origin point is the coordinate in a Flash movie or vector shape around which scaling and rotation occurs. The origin point can be set with floating-point precision using the separate originH and originV properties, or it can be set with integer precision using the single originPoint property.

You can set the originH 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 does not display correctly.

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 horizontal and vertical origin points.

on beginSprite me
	sprite(spriteNum of me).originMode = #point
	sprite(spriteNum of me).originH = 100
	sprite(spriteNum of me).originV = 80
end

See also

originV, originMode, originPoint, scaleMode