Lingo Dictionary > L-N > locH |  |

locH

Syntax

    sprite(whichSprite).locH
    the locH of sprite whichSprite

Description

Sprite property; indicates the horizontal position of the specified sprite's registration point. Sprite coordinates are relative to the upper left corner of the Stage.

This property can be tested and set. To make the value last beyond the current sprite, make the sprite a puppet.

Example

This statement checks whether the horizontal position of sprite 9's registration point is to the right of the right edge of the stage and moves the sprite to the left edge of the Stage if it is:

    if sprite(9).locH > (the stageRight - the stageLeft) then
    	sprite(9).locH = 0
    end if

Example

This statement puts sprite 15 at the same horizontal location as the mouse click:

    sprite(15).locH = the mouseH

See also

`bottom`, `height`, `left`, `locV`, `point()`, `right`, `top`, `width`, `updateStage`